summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-01-19 14:59:04 +0100
committerPeter Simons <simons@cryp.to>2015-01-19 23:15:29 +0100
commitf8710f9d81d198ea39538c6a492893005f54051f (patch)
treee6ab18ac757aa666afc4f2bf737c21b054ceede6
parent8959aade3259a3dc4d3854c5a5eb3d9c88abfbb1 (diff)
downloadnixlib-f8710f9d81d198ea39538c6a492893005f54051f.tar
nixlib-f8710f9d81d198ea39538c6a492893005f54051f.tar.gz
nixlib-f8710f9d81d198ea39538c6a492893005f54051f.tar.bz2
nixlib-f8710f9d81d198ea39538c6a492893005f54051f.tar.lz
nixlib-f8710f9d81d198ea39538c6a492893005f54051f.tar.xz
nixlib-f8710f9d81d198ea39538c6a492893005f54051f.tar.zst
nixlib-f8710f9d81d198ea39538c6a492893005f54051f.zip
haskell-ng: fix several builds with old versions of GHC
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix15
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-6.12.x.nix15
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-7.0.x.nix6
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix8
-rw-r--r--pkgs/development/haskell-modules/hackage-packages.nix13
-rw-r--r--pkgs/development/haskell-modules/lib.nix3
6 files changed, 57 insertions, 3 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 5d928851a744..00eb3f32621e 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -134,6 +134,21 @@ self: super: {
 
   # tests don't compile for some odd reason
   jwt = dontCheck super.jwt;
+
+  # Allow building with mtl 2.2. Upstream has been notified by e-mail.
+  tabular = doJailbreak super.tabular;
+
+  # https://github.com/liamoc/wizards/issues/5
+  wizards = doJailbreak super.wizards;
+
+  # https://github.com/ekmett/trifecta/issues/41
+  trifecta = overrideCabal super.trifecta (drv: {
+    patches = [
+    (pkgs.fetchpatch {
+       url = "https://github.com/ekmett/trifecta/pull/40.patch";
+       sha256 = "0q8j9zwi5q651q5zd3mz52nz4ki36rvixbkp20nx2vf5imi050bq";
+    })];});
+
 }
 // {
   # Not on Hackage yet.
diff --git a/pkgs/development/haskell-modules/configuration-ghc-6.12.x.nix b/pkgs/development/haskell-modules/configuration-ghc-6.12.x.nix
index 6641b27f0fd7..63a94f1585fb 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-6.12.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-6.12.x.nix
@@ -41,7 +41,8 @@ self: super: {
   binary = self.binary_0_7_2_3;
 
   # deepseq is not a core library for this compiler.
-  deepseq = self.deepseq_1_4_0_0;
+  deepseq_1_3_0_1 = dontJailbreak super.deepseq_1_3_0_1;
+  deepseq = self.deepseq_1_3_0_1;
 
   # transformers is not a core library for this compiler.
   transformers = self.transformers_0_4_2_0;
@@ -62,4 +63,16 @@ self: super: {
     patchPhase = "sed -ir -e 's|Extensions: | Extensions: UndecidableInstances, |' utf8-string.cabal";
   });
 
+  # https://github.com/haskell/HTTP/issues/80
+  HTTP = doJailbreak super.HTTP;
+
+  # 6.12.3 doesn't support the latest version.
+  primitive = self.primitive_0_5_1_0;
+
+  # These packages need more recent versions of core libraries to compile.
+  happy = addBuildTools super.happy [self.Cabal_1_18_1_6 self.containers_0_4_2_1];
+  network-uri = addBuildTool super.network-uri self.Cabal_1_18_1_6;
+  stm = addBuildTool super.stm self.Cabal_1_18_1_6;
+  split = super.split_0_1_4_3;
+
 }
diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.0.x.nix
index bd8b09d040d7..78f3479ddb58 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-7.0.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-7.0.x.nix
@@ -51,4 +51,10 @@ self: super: {
   # Haddock chokes on the prologue from the cabal file.
   ChasingBottoms = dontHaddock super.ChasingBottoms;
 
+  # https://github.com/haskell/containers/issues/134
+  containers_0_4_2_1 = doJailbreak super.containers_0_4_2_1;
+
+  # These packages need more recent versions of core libraries to compile.
+  happy = addBuildTools super.happy [self.containers_0_4_2_1 self.deepseq_1_3_0_1 self.containers_0_4_2_1];
+
 }
diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix
index 820a44c6b4ff..e9bef1e6c9a2 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix
@@ -16,7 +16,6 @@ self: super: {
   directory = null;
   filepath = null;
   ghc-prim = null;
-  haskeline = null;
   haskell2010 = null;
   haskell98 = null;
   hoopl = null;
@@ -28,7 +27,6 @@ self: super: {
   process = null;
   rts = null;
   template-haskell = null;
-  terminfo = null;
   time = null;
   unix = null;
 
@@ -37,6 +35,10 @@ self: super: {
   mtl = self.mtl_2_2_1;
   transformers-compat = disableCabalFlag super.transformers-compat "three";
 
+  # haskeline and terminfo are not core libraries for this compiler.
+  haskeline = self.haskeline_0_7_1_3;
+  terminfo = self.terminfo_0_4_0_0;
+
   # https://github.com/haskell/cabal/issues/2322
   Cabal_1_22_0_0 = super.Cabal_1_22_0_0.override { binary = self.binary_0_7_2_3; };
 
@@ -49,4 +51,6 @@ self: super: {
   # Haddock chokes on the prologue from the cabal file.
   ChasingBottoms = dontHaddock super.ChasingBottoms;
 
+  # wizards = doJailbreak super.wizards;
+
 }
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index d64a748e0e46..59999ae59849 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -104788,6 +104788,19 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "split_0_1_4_3" = callPackage
+    ({ mkDerivation, base }:
+     mkDerivation {
+       pname = "split";
+       version = "0.1.4.3";
+       sha256 = "1i9vmb0zvmhqj6qcbnsapsk9lhsyzznz336c8s7v4sz20s99hsby";
+       buildDepends = [ base ];
+       jailbreak = true;
+       homepage = "http://code.haskell.org/~byorgey/code/split";
+       description = "Combinator library for splitting lists";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "split" = callPackage
     ({ mkDerivation, base, QuickCheck }:
      mkDerivation {
diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix
index 4d0afb33ca01..cc2077ebf86c 100644
--- a/pkgs/development/haskell-modules/lib.nix
+++ b/pkgs/development/haskell-modules/lib.nix
@@ -22,6 +22,9 @@ rec {
   appendConfigureFlag = drv: x: overrideCabal drv (drv: { configureFlags = (drv.configureFlags or []) ++ [x]; });
   removeConfigureFlag = drv: x: overrideCabal drv (drv: { configureFlags = pkgs.stdenv.lib.remove x (drv.configureFlags or []); });
 
+  addBuildTool = drv: x: addBuildTools drv [x];
+  addBuildTools = drv: xs: overrideCabal drv (drv: { buildTools = (drv.buildTools or []) ++ xs; });
+
   enableCabalFlag = drv: x: appendConfigureFlag (removeConfigureFlag drv "-f-${x}") "-f${x}";
   disableCabalFlag = drv: x: appendConfigureFlag (removeConfigureFlag drv "-f${x}") "-f-${x}";