about summary refs log tree commit diff
path: root/pkgs/development/libraries/haskell/haskell-platform/2011.2.0.1.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/haskell/haskell-platform/2011.2.0.1.nix')
-rw-r--r--pkgs/development/libraries/haskell/haskell-platform/2011.2.0.1.nix24
1 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/development/libraries/haskell/haskell-platform/2011.2.0.1.nix b/pkgs/development/libraries/haskell/haskell-platform/2011.2.0.1.nix
index 33bc493b3cc32..da70d32861d0f 100644
--- a/pkgs/development/libraries/haskell/haskell-platform/2011.2.0.1.nix
+++ b/pkgs/development/libraries/haskell/haskell-platform/2011.2.0.1.nix
@@ -3,25 +3,29 @@
  stm, syb, deepseq, text, transformers, mtl, xhtml, zlib,
  cabalInstall, alex, happy, haddock, ghc}:
 
+# This is just a meta-package. Because upstream fails to provide proper versioned
+# release tarballs that can be used for the purpose of verifying this package, we
+# just create it on the fly from a simple Setup.hs file and a .cabal file that we
+# store directly in the nixpkgs repository.
+
 cabal.mkDerivation (self : {
   pname = "haskell-platform";
   version = "2011.2.0.1";
-  src = fetchurl {
-    url = "http://lambda.haskell.org/hp-tmp/2011.2.0.0/cabal/${self.pname}-2011.2.0.0.tar.gz";
-    sha256 = "01ppv8jdyvbngml9vgvrvnani6fj1nbk8mqmrkd8c508l7q9g6vb";
-  };
-  cabalFile = fetchurl {
-    url = http://code.galois.com/darcs/haskell-platform/haskell-platform.cabal;
-    sha256 = "158a1g4ak9mm2q5ri4zdpmbvjgfkz7svxnkxlz8117zpnbs12i3d";
-  };
+  cabalFile = ./haskell-platform-2011.2.0.1.cabal;
+  setupFile = ./Setup.hs;
+  src = null;
   propagatedBuildInputs = [
     GLUT HTTP HUnit OpenGL QuickCheck cgi fgl
     haskellSrc html network parallel parsec regexBase regexCompat regexPosix
     stm syb deepseq text transformers mtl xhtml zlib
     cabalInstall alex happy ghc haddock
   ];
-  preConfigure = ''
-    cp ${self.cabalFile} ${self.pname}.cabal
+  unpackPhase = ''
+    sourceRoot=haskell-platform
+    mkdir $sourceRoot
+    cp ${self.cabalFile} $sourceRoot/${self.pname}.cabal
+    cp ${self.setupFile} $sourceRoot/Setup.hs
+    touch $sourceRoot/LICENSE
   '';
   noHaddock = true;
   meta = {