about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
diff options
context:
space:
mode:
authorMichael Alan Dorman <mdorman@ironicdesign.com>2019-09-27 08:17:09 +0300
committerMichael Alan Dorman <mdorman@ironicdesign.com>2019-09-27 08:18:04 +0300
commite7eb269d455d7afa0fd7abb211036f721b7afc78 (patch)
tree8ba4ed65383d76e424720ccc66781201a856bd35 /pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
parentcfe8afebe5c60520d55020793793cea5d01ece1b (diff)
cabal2nix: fix build
Without this change, the build fails with:

```
Warning:
    This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
      package hackage-db (hackage-db-2.0.1-AliTRXEJBGFAEMpONOEnbV) requires Cabal-2.4.0.1
      package hpack (hpack-0.32.0-1iJuukTWmC4EGkYhAiFeII) requires Cabal-3.0.0.0-CD1INMNwoxXIKVgcu1nec5
      package distribution-nixpkgs (distribution-nixpkgs-1.3.1-82Z2DCdLAUs8Q2gjtlPLz5) requires Cabal-3.0.0.0-CD1INMNwoxXIKVgcu1nec5
      package cabal2nix (cabal2nix-2.15.0) requires Cabal-3.0.0.0-CD1INMNwoxXIKVgcu1nec5
      package cabal2nix (cabal2nix-2.15.0) requires Cabal-3.0.0.0-CD1INMNwoxXIKVgcu1nec5
      package cabal2nix (cabal2nix-2.15.0) requires Cabal-3.0.0.0-CD1INMNwoxXIKVgcu1nec5
```
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
index 455b2358da77d..41b6177efef62 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
@@ -95,7 +95,11 @@ self: super: {
   # Newer versions don't compile.
   resolv = self.resolv_0_1_1_2;
 
-  # cabal2nix needs the latest version of Cabal.
-  cabal2nix = super.cabal2nix.overrideScope (self: super: { Cabal = self.Cabal_3_0_0_0; });
+  # cabal2nix needs the latest version of Cabal, and the one
+  # hackage-db uses must match, so take the latest
+  cabal2nix = super.cabal2nix.overrideScope (self: super: {
+    Cabal = self.Cabal_3_0_0_0;
+    hackage-db = self.hackage-db_2_1_0;
+  });
 
 }