summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2023-07-02 14:03:22 +0200
committersternenseemann <sternenseemann@systemli.org>2023-07-02 14:22:20 +0200
commit54ebdad42dd5861538de31319206fcef78ec9df5 (patch)
tree7e246bc9ca0ec0ee192941c6ce93204f903a0b4f
parent6cc8bbe4b62b8a2005c78093220751bcdb804922 (diff)
downloadnixpkgs-54ebdad42dd5861538de31319206fcef78ec9df5.tar
nixpkgs-54ebdad42dd5861538de31319206fcef78ec9df5.tar.gz
nixpkgs-54ebdad42dd5861538de31319206fcef78ec9df5.tar.bz2
nixpkgs-54ebdad42dd5861538de31319206fcef78ec9df5.tar.lz
nixpkgs-54ebdad42dd5861538de31319206fcef78ec9df5.tar.xz
nixpkgs-54ebdad42dd5861538de31319206fcef78ec9df5.tar.zst
nixpkgs-54ebdad42dd5861538de31319206fcef78ec9df5.zip
haskell.packages.{ghc88,ghc810}.base-compat-batteries: loosen OneTuple bound
Loosening the bound seems easier than downgrading OneTuple in these package sets.
See also the linked issue.
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix8
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix8
2 files changed, 14 insertions, 2 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
index d4d18fd327c..0a5e323fe3f 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
@@ -55,7 +55,13 @@ self: super: {
   system-cxx-std-lib = null;
 
   # Additionally depends on OneTuple for GHC < 9.0
-  base-compat-batteries = addBuildDepend self.OneTuple super.base-compat-batteries;
+  # https://github.com/haskell-compat/base-compat/issues/91
+  base-compat-batteries = addBuildDepend self.OneTuple (overrideCabal (drv: {
+    postPatch = ''
+      ${drv.postPatch or ""}
+      sed -i 's/OneTuple >= 0.3 && < 0.4/OneTuple/' *.cabal
+    '';
+  }) super.base-compat-batteries);
 
   # For GHC < 9.4, some packages need data-array-byte as an extra dependency
   primitive = addBuildDepends [ self.data-array-byte ] super.primitive;
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
index ad9b8e5a1d1..f899f26562f 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
@@ -61,7 +61,13 @@ self: super: {
   cabal2spec = super.cabal2spec.override { Cabal = self.Cabal_3_2_1_0; };
 
   # Additionally depends on OneTuple for GHC < 9.0
-  base-compat-batteries = addBuildDepend self.OneTuple super.base-compat-batteries;
+  # https://github.com/haskell-compat/base-compat/issues/91
+  base-compat-batteries = addBuildDepend self.OneTuple (overrideCabal (drv: {
+    postPatch = ''
+      ${drv.postPatch or ""}
+      sed -i 's/OneTuple >= 0.3 && < 0.4/OneTuple/' *.cabal
+    '';
+  }) super.base-compat-batteries);
 
   # For GHC < 9.4, some packages need data-array-byte as an extra dependency
   primitive = addBuildDepends [ self.data-array-byte ] super.primitive;