summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndres Löh2009-04-21 21:05:30 +0000
committerAndres Löh2009-04-21 21:05:30 +0000
commitd3b5bc4a2031f1334425d0580e668db1eb5271c3 (patch)
tree84929137cf302d063b57389e52317a22aee47bf2
parent233cf7478157868e9566a64e06c7906b598606c2 (diff)
* Fixed external library dependencies for some Haskell-Platform packages.
* Added Agda plus dependencies.

svn path=/nixpkgs/trunk/; revision=15227
-rw-r--r--pkgs/development/libraries/haskell/Agda/default.nix15
-rw-r--r--pkgs/development/libraries/haskell/GLUT/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/QuickCheck/2.1.0.1.nix13
-rw-r--r--pkgs/development/libraries/haskell/cabal/cabal.nix12
-rw-r--r--pkgs/development/libraries/haskell/extensible-exceptions/default.nix11
-rw-r--r--pkgs/development/libraries/haskell/haskeline/default.nix12
-rw-r--r--pkgs/top-level/haskell-packages.nix27
7 files changed, 81 insertions, 13 deletions
diff --git a/pkgs/development/libraries/haskell/Agda/default.nix b/pkgs/development/libraries/haskell/Agda/default.nix
new file mode 100644
index 000000000000..e1f5b27c0ec6
--- /dev/null
+++ b/pkgs/development/libraries/haskell/Agda/default.nix
@@ -0,0 +1,15 @@
+{cabal, QuickCheck, binary, haskeline, haskellSrc, mtl, utf8String, xhtml, zlib,
+ happy, alex}:
+
+cabal.mkDerivation (self : {
+  pname = "Agda";
+  version = "2.2.2";
+  sha256 = "265dbb5bc6d67bfeefa4a2a4ac9e5018d6d8b5c1a75816e05da2661c43a39bba";
+  extraBuildInputs = [happy alex];
+  propagatedBuildInputs =
+    [QuickCheck binary haskeline haskellSrc mtl utf8String xhtml zlib];
+  meta = {
+    description = "A dependently typed functional language and proof assistant";
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/GLUT/default.nix b/pkgs/development/libraries/haskell/GLUT/default.nix
index 0ddbb73f9ff0..9ccae0604f00 100644
--- a/pkgs/development/libraries/haskell/GLUT/default.nix
+++ b/pkgs/development/libraries/haskell/GLUT/default.nix
@@ -1,10 +1,10 @@
-{cabal, OpenGL, glut}:
+{cabal, OpenGL, glut, libSM, libICE, libXmu, libXi, mesa}:
 
 cabal.mkDerivation (self : {
   pname = "GLUT";
   version = "2.1.1.2"; # Haskell Platform 2009.0.0
   sha256 = "d5ecf4b6bacc5e68ade00710df04fa158c6ed322c74362954716a0baba6bd3fb";
-  propagatedBuildInputs = [OpenGL glut];
+  propagatedBuildInputs = [OpenGL glut libSM libICE libXmu libXi mesa];
   meta = {
     description = "A binding for the OpenGL Utility Toolkit";
   };
diff --git a/pkgs/development/libraries/haskell/QuickCheck/2.1.0.1.nix b/pkgs/development/libraries/haskell/QuickCheck/2.1.0.1.nix
new file mode 100644
index 000000000000..e84a77809836
--- /dev/null
+++ b/pkgs/development/libraries/haskell/QuickCheck/2.1.0.1.nix
@@ -0,0 +1,13 @@
+{cabal, mtl}:
+
+cabal.mkDerivation (self : {
+  pname = "QuickCheck";
+  version = "2.1.0.1";
+  sha256 = "f99edf1a45315e90c9ec672d5d959d5878dcc1de65678c6aed85829a896b75f1";
+  propagatedBuildInputs = [mtl];
+  configureFlags = ''--constraint=base<4'';
+  meta = {
+    description = "Automatic testing of Haskell programs";
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/cabal/cabal.nix b/pkgs/development/libraries/haskell/cabal/cabal.nix
index 263eaec63058..cac8990d271f 100644
--- a/pkgs/development/libraries/haskell/cabal/cabal.nix
+++ b/pkgs/development/libraries/haskell/cabal/cabal.nix
@@ -39,22 +39,14 @@ attrs :
             # library directories that have to be added to the Cabal files
             extraLibDirs = map (x : x + "/lib") self.propagatedBuildInputs;
 
-            # file(s) that have to be patched with information about extra libraries;
-            # can be redefined to the empty list by the client if this is not desired
-            patchLibFiles = [ "${self.pname}.cabal" ];
-
-            # patches files, compiles Setup, and configures
+            # compiles Setup and configures
             configurePhase = ''
               eval "$preConfigure"
 
-              for i in ${toString self.patchLibFiles}; do
-                echo "patching $i"
-                test -f $i && sed -i '/[eE]xtra-[lL]ibraries/ { s|^\( *\)[eE]xtra-[lL]ibraries.*|&\n\1extra-lib-dirs: ${toString self.extraLibDirs}| }' $i
-              done
               for i in Setup.hs Setup.lhs; do
                 test -f $i && ghc --make $i
               done
-              ./Setup configure --verbose --prefix="$out" $configureFlags
+              ./Setup configure --verbose --prefix="$out" ${toString (map (x : "--extra-lib-dir=" + x) self.extraLibDirs)} $configureFlags
 
               eval "$postConfigure"
             '';
diff --git a/pkgs/development/libraries/haskell/extensible-exceptions/default.nix b/pkgs/development/libraries/haskell/extensible-exceptions/default.nix
new file mode 100644
index 000000000000..93857414f602
--- /dev/null
+++ b/pkgs/development/libraries/haskell/extensible-exceptions/default.nix
@@ -0,0 +1,11 @@
+{cabal}:
+
+cabal.mkDerivation (self : {
+  pname = "extensible-exceptions";
+  version = "0.1.1.0";
+  sha256 = "c252dc5a505332700f041d4e1fd3d309cde6158892f9c35339bf5e67bad7f781";
+  meta = {
+    description = "Extensible exceptions";
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/haskeline/default.nix b/pkgs/development/libraries/haskell/haskeline/default.nix
new file mode 100644
index 000000000000..e46427bcc3c4
--- /dev/null
+++ b/pkgs/development/libraries/haskell/haskeline/default.nix
@@ -0,0 +1,12 @@
+{cabal, extensibleExceptions, mtl, utf8String}:
+
+cabal.mkDerivation (self : {
+  pname = "haskeline";
+  version = "0.6.1.3";
+  sha256 = "af27d17bf6df7647e843bca91548b542748a5305f072ba7cfef97105a52578d4";
+  propagatedBuildInputs = [extensibleExceptions mtl utf8String];
+  meta = {
+    description = "A command-line interface for user input, written in Haskell";
+  };
+})  
+
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 396c895b237b..7f3621d26cc1 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -23,6 +23,13 @@ rec {
 
   # Haskell libraries.
 
+  # Agda depends on a specific version of QuickCheck
+  Agda = import ../development/libraries/haskell/Agda {
+    inherit cabal binary haskeline haskellSrc mtl utf8String xhtml zlib
+      happy alex;
+    QuickCheck = QuickCheck2101;
+  };
+
   benchpress = import ../development/libraries/haskell/benchpress {
     inherit cabal;
   };
@@ -44,6 +51,10 @@ rec {
     inherit cabal;
   };
 
+  extensibleExceptions = import ../development/libraries/haskell/extensible-exceptions {
+    inherit cabal;
+  };
+
   fgl = import ../development/libraries/haskell/fgl {
     inherit cabal mtl;
   };
@@ -55,6 +66,8 @@ rec {
   GLUT = import ../development/libraries/haskell/GLUT {
     inherit cabal OpenGL;
     glut = pkgs.freeglut;
+    inherit (pkgs) mesa;
+    inherit (pkgs.xlibs) libSM libICE libXmu libXi;
   };
   
   gtk2hs = import ../development/libraries/haskell/gtk2hs {
@@ -62,6 +75,10 @@ rec {
     inherit (pkgs) stdenv fetchurl pkgconfig gnome cairo;
   };
 
+  haskeline = import ../development/libraries/haskell/haskeline {
+    inherit cabal extensibleExceptions mtl utf8String;
+  };
+
   haskellSrc = import ../development/libraries/haskell/haskell-src {
     inherit cabal happy;
   };
@@ -164,10 +181,18 @@ rec {
     inherit (pkgs) pcre;
   };
 
-  QuickCheck = import ../development/libraries/haskell/QuickCheck {
+  QuickCheck  = QuickCheck1;
+  QuickCheck1 = QuickCheck1200;
+  QuickCheck2 = QuickCheck2101;
+
+  QuickCheck1200 = import ../development/libraries/haskell/QuickCheck {
     inherit cabal;
   };
 
+  QuickCheck2101 = import ../development/libraries/haskell/QuickCheck/2.1.0.1.nix {
+    inherit cabal mtl;
+  };
+
   regexBase = import ../development/libraries/haskell/regex-base {
     inherit cabal mtl;
   };