summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/libraries/haskell/haskell-platform/default.nix34
-rw-r--r--pkgs/development/tools/documentation/haddock/haddock-2.4.2.nix5
-rw-r--r--pkgs/top-level/haskell-packages.nix10
3 files changed, 47 insertions, 2 deletions
diff --git a/pkgs/development/libraries/haskell/haskell-platform/default.nix b/pkgs/development/libraries/haskell/haskell-platform/default.nix
new file mode 100644
index 00000000000..88aea6e1d39
--- /dev/null
+++ b/pkgs/development/libraries/haskell/haskell-platform/default.nix
@@ -0,0 +1,34 @@
+{cabal, fetchurl, GLUT, HTTP, HUnit, OpenAL, OpenGL, QuickCheck, cgi, fgl,
+ haskellSrc, html, parallel, regexBase, regexCompat, regexPosix,
+ stm, time, xhtml, zlib, cabalInstall, alex, happy, haddock}:
+
+cabal.mkDerivation (self : {
+  pname = "haskell-platform";
+  version = "2009.0.0";
+  src = fetchurl {
+    url = http://code.haskell.org/haskell-platform/haskell-platform.cabal;
+    sha256 = "cefe19076bed6450d3d8611ff1b29fd0966106787003abedec90544968f30d9c";
+  };
+  unpackPhase = ''
+    cp $src haskell-platform.cabal
+  '';
+  preConfigure = ''
+    sed -i 's/^.*cabal-install ==.*$//' haskell-platform.cabal
+    echo 'import Distribution.Simple; main = defaultMain' > Setup.hs
+    touch LICENSE
+  '';
+  propagatedBuildInputs = [
+    GLUT HTTP HUnit OpenAL OpenGL QuickCheck cgi fgl
+    haskellSrc html parallel regexBase regexCompat regexPosix
+    stm time xhtml zlib cabalInstall alex happy
+  ];
+  /*
+  postFixup = ''
+    ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
+  '';
+  */
+  meta = {
+    description = "Haskell Platform meta package";
+  };
+})  
+
diff --git a/pkgs/development/tools/documentation/haddock/haddock-2.4.2.nix b/pkgs/development/tools/documentation/haddock/haddock-2.4.2.nix
index f3290d15fd6..ff7c982267e 100644
--- a/pkgs/development/tools/documentation/haddock/haddock-2.4.2.nix
+++ b/pkgs/development/tools/documentation/haddock/haddock-2.4.2.nix
@@ -1,11 +1,12 @@
-{cabal, ghcPaths}:
+{cabal, ghcPaths, libedit}:
 
 cabal.mkDerivation (self : {
   pname = "haddock";
   version = "2.4.2"; # Haskell Platform 2009.0.0
   name = self.fname;
   sha256 = "dbf0a7d0103a3ce6a91b2a3b96148c1b9c13ea7f8bd74260c21fe98df7839547";
-  propagatedBuildInputs = [ghcPaths];
+  # TODO: adding libedit here is a hack
+  propagatedBuildInputs = [ghcPaths libedit];
   meta = {
     description = "a tool for automatically generating documentation from annotated Haskell source code";
   };
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 2a2f3f096db..54767b4787d 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -66,6 +66,13 @@ rec {
     inherit cabal happy;
   };
   
+  haskellPlatform = import ../development/libraries/haskell/haskell-platform {
+    inherit cabal GLUT HTTP HUnit OpenAL OpenGL QuickCheck cgi fgl
+      haskellSrc html parallel regexBase regexCompat regexPosix
+      stm time xhtml zlib cabalInstall alex happy haddock;
+    inherit (pkgs) fetchurl;
+  };
+
   HTTP = import ../development/libraries/haskell/HTTP {
     inherit cabal mtl network parsec;
   };
@@ -230,6 +237,8 @@ rec {
     inherit (pkgs) fetchurl stdenv;
   };
 
+  haddock = haddock242;
+
   # old version of haddock, still more stable than 2.0
   haddock09 = import ../development/tools/documentation/haddock/haddock-0.9.nix {
     inherit cabal;
@@ -242,6 +251,7 @@ rec {
 
   haddock242 = import ../development/tools/documentation/haddock/haddock-2.4.2.nix {
     inherit cabal ghcPaths;
+    inherit (pkgs) libedit;
   };
 
   happy = happy1182;