diff options
author | Rodney Lorrimar <dev@rodney.id.au> | 2024-01-11 15:50:56 +0800 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2024-01-11 14:49:29 +0100 |
commit | 8ecc123cf0d206dffdf79c3c06cdc9460b987557 (patch) | |
tree | 682bface5806ae660e83b7a7f361a7df33d70321 | |
parent | f805a394487072d8ce1ed2d530c7519a895abd3a (diff) |
haskell.packages.*.{these,OneTuple}: provide compat pkg where needed
Co-authored-by: sternenseemann <sternenseemann@systemli.org>
4 files changed, 44 insertions, 22 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 c2fc6f962d9cb..6895fd2cc0d63 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -4,6 +4,7 @@ with haskellLib; let inherit (pkgs.stdenv.hostPlatform) isDarwin; + inherit (pkgs) lib; in self: super: { @@ -120,13 +121,6 @@ self: super: { # Overly-strict bounds introducted by a revision in version 0.3.2. text-metrics = doJailbreak super.text-metrics; - # OneTuple needs hashable (instead of ghc-prim) and foldable1-classes-compat for GHC < 9 - OneTuple = addBuildDepends [ - self.foldable1-classes-compat - ] (super.OneTuple.override { - ghc-prim = self.hashable; - }); - # Doesn't build with 9.0, see https://github.com/yi-editor/yi/issues/1125 yi-core = doDistribute (markUnbroken super.yi-core); @@ -171,8 +165,19 @@ self: super: { # No instance for (Show B.Builder) arising from a use of ‘print’ http-types = dontCheck super.http-types; - # Needs compat library for GHC < 9.6 - indexed-traversable = addBuildDepends [ + # Packages which need compat library for GHC < 9.6 + inherit + (lib.mapAttrs + (_: addBuildDepends [ self.foldable1-classes-compat ]) + super) + indexed-traversable + these + ; + + # OneTuple needs hashable (instead of ghc-prim) and foldable1-classes-compat for GHC < 9 + OneTuple = addBuildDepends [ self.foldable1-classes-compat - ] super.indexed-traversable; + ] (super.OneTuple.override { + ghc-prim = self.hashable; + }); } diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix index 6932dbc4843ae..a435d75a9bbb0 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -4,6 +4,7 @@ with haskellLib; let inherit (pkgs.stdenv.hostPlatform) isDarwin; + inherit (pkgs) lib; in self: super: { @@ -136,8 +137,13 @@ self: super: { # No instance for (Show B.Builder) arising from a use of ‘print’ http-types = dontCheck super.http-types; - # Needs compat library for GHC < 9.6 - indexed-traversable = addBuildDepends [ - self.foldable1-classes-compat - ] super.indexed-traversable; + # Packages which need compat library for GHC < 9.6 + inherit + (lib.mapAttrs + (_: addBuildDepends [ self.foldable1-classes-compat ]) + super) + indexed-traversable + OneTuple + these + ; } diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix index 11a9d8a606dc5..48d67fc133ccd 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix @@ -4,6 +4,7 @@ with haskellLib; let inherit (pkgs.stdenv.hostPlatform) isDarwin; + inherit (pkgs) lib; in self: super: { @@ -128,8 +129,13 @@ self: super: { # Requires GHC < 9.4 ghc-source-gen = doDistribute (unmarkBroken super.ghc-source-gen); - # Needs compat library for GHC < 9.6 - indexed-traversable = addBuildDepends [ - self.foldable1-classes-compat - ] super.indexed-traversable; + # Packages which need compat library for GHC < 9.6 + inherit + (lib.mapAttrs + (_: addBuildDepends [ self.foldable1-classes-compat ]) + super) + indexed-traversable + OneTuple + these + ; } diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix index 3e82db6791264..d62712f468115 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix @@ -127,8 +127,13 @@ in { stylish-haskell ; - # Needs compat library for GHC < 9.6 - indexed-traversable = addBuildDepends [ - self.foldable1-classes-compat - ] super.indexed-traversable; + # Packages which need compat library for GHC < 9.6 + inherit + (lib.mapAttrs + (_: addBuildDepends [ self.foldable1-classes-compat ]) + super) + indexed-traversable + OneTuple + these + ; } |