summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2018-10-22 13:52:22 +0200
committerPeter Simons <simons@cryp.to>2018-10-25 11:12:38 +0200
commitc66c169f8150d6c8ed5c5c2993c7de197b7ec48a (patch)
treeb6050b824fd81284715e6026163880a2d2780207
parent8089b93697a69f74fe70e65c0421868a7a0480d4 (diff)
downloadnixlib-c66c169f8150d6c8ed5c5c2993c7de197b7ec48a.tar
nixlib-c66c169f8150d6c8ed5c5c2993c7de197b7ec48a.tar.gz
nixlib-c66c169f8150d6c8ed5c5c2993c7de197b7ec48a.tar.bz2
nixlib-c66c169f8150d6c8ed5c5c2993c7de197b7ec48a.tar.lz
nixlib-c66c169f8150d6c8ed5c5c2993c7de197b7ec48a.tar.xz
nixlib-c66c169f8150d6c8ed5c5c2993c7de197b7ec48a.tar.zst
nixlib-c66c169f8150d6c8ed5c5c2993c7de197b7ec48a.zip
stack: fix the ghc 8.4.x build
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix18
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
index 8d0669ca2acb..052779e9a1e8 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
@@ -56,8 +56,20 @@ self: super: {
           };
     in appendPatch super.hadoop-rpc patch;
 
-  # Version 1.9.1 needs Cabal 2.4.x or later, so
-  # we use the one from the ghc-8.6.1 package set.
-  stack = markBroken super.stack;
+  # stack-1.9.1 needs Cabal 2.4.x, a recent version of hpack, and a non-recent
+  # version of yaml. Go figure. We avoid overrideScope here because using it to
+  # change Cabal would re-compile every single package instead of just those
+  # that have it as an actual library dependency. The explicit overrides are
+  # more verbose but friendlier for Hydra.
+  stack = (doJailbreak super.stack).override {
+    Cabal = self.Cabal_2_4_0_1;
+    hpack = self.hpack_0_31_0;
+    yaml = self.yaml_0_11_0_0;
+    hackage-security = self.hackage-security.override { Cabal = self.Cabal_2_4_0_1; };
+  };
+  hpack_0_31_0 = super.hpack_0_31_0.override {
+    Cabal = self.Cabal_2_4_0_1;
+    yaml = self.yaml_0_11_0_0;
+  };
 
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 435a5c90e25e..dea13be70d0d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6848,7 +6848,7 @@ with pkgs;
 
   cabal-install = haskell.lib.justStaticExecutables haskellPackages.cabal-install;
 
-  stack = haskell.lib.justStaticExecutables haskell.packages.ghc861.stack;
+  stack = haskell.lib.justStaticExecutables haskellPackages.stack;
   hlint = haskell.lib.justStaticExecutables haskellPackages.hlint;
 
   all-cabal-hashes = callPackage ../data/misc/hackage { };