summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-09-15 12:43:14 +0200
committerPeter Simons <simons@cryp.to>2015-09-15 16:23:46 +0200
commit974f2122b1163de0315c51fc161cdb97b66d6111 (patch)
treedb661da4d225aa12a285919a41613b1d56f4bd3b
parent73d79ed9457f2bc3d52bad25b5c235e29734c031 (diff)
downloadnixpkgs-974f2122b1163de0315c51fc161cdb97b66d6111.tar
nixpkgs-974f2122b1163de0315c51fc161cdb97b66d6111.tar.gz
nixpkgs-974f2122b1163de0315c51fc161cdb97b66d6111.tar.bz2
nixpkgs-974f2122b1163de0315c51fc161cdb97b66d6111.tar.lz
nixpkgs-974f2122b1163de0315c51fc161cdb97b66d6111.tar.xz
nixpkgs-974f2122b1163de0315c51fc161cdb97b66d6111.tar.zst
nixpkgs-974f2122b1163de0315c51fc161cdb97b66d6111.zip
jailbreak-cabal: clean up overrides
These changes ensure that jailbreak-cabal works correctly without further
configuration even with older compilers. The exception to that rule being,
naturally, versions of GHC that can't compile Cabal 1.20.x; these *do* need
another override.
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix2
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix12
2 files changed, 8 insertions, 6 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index ee8089f9063..80cf5ebd478 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -12,7 +12,7 @@ self: super: {
   cabal-install_1_18_1_0 = (dontCheck super.cabal-install_1_18_1_0).overrideScope (self: super: { Cabal = self.Cabal_1_18_1_6; zlib = self.zlib_0_5_4_2; });
 
   # Link statically to avoid runtime dependency on GHC.
-  jailbreak-cabal = disableSharedExecutables super.jailbreak-cabal;
+  jailbreak-cabal = (disableSharedExecutables super.jailbreak-cabal).override { Cabal = dontJailbreak self.Cabal_1_20_0_3; };
 
   # Apply NixOS-specific patches.
   ghc-paths = appendPatch super.ghc-paths ./patches/ghc-paths-nix.patch;
diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
index 0061b8f34a1..aad72ad1c12 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
@@ -41,7 +41,7 @@ self: super: {
   # Cabal_1_22_1_1 requires filepath >=1 && <1.4
   cabal-install = dontCheck (super.cabal-install.override { Cabal = null; });
 
-  # Don't use jailbreak built with Cabal 1.22.x because of https://github.com/peti/jailbreak-cabal/issues/9.
+  # Don't compile jailbreak-cabal with Cabal 1.22.x because of https://github.com/peti/jailbreak-cabal/issues/9.
   Cabal_1_23_0_0 = overrideCabal super.Cabal_1_22_4_0 (drv: {
     version = "1.23.0.0";
     src = pkgs.fetchFromGitHub {
@@ -54,10 +54,12 @@ self: super: {
     doHaddock = false;
     postUnpack = "sourceRoot+=/Cabal";
   });
-  jailbreak-cabal = overrideCabal super.jailbreak-cabal (drv: {
-    executableHaskellDepends = [ self.Cabal_1_23_0_0 ];
-    preConfigure = "sed -i -e 's/Cabal == 1.20\\.\\*/Cabal >= 1.23/' jailbreak-cabal.cabal";
-  });
+  jailbreak-cabal = super.jailbreak-cabal.override {
+    Cabal = self.Cabal_1_23_0_0;
+    mkDerivation = drv: self.mkDerivation (drv // {
+      preConfigure = "sed -i -e 's/Cabal == 1.20\\.\\*/Cabal >= 1.23/' jailbreak-cabal.cabal";
+    });
+  };
 
   idris =
     let idris' = overrideCabal super.idris (drv: {