From 6cc8bbe4b62b8a2005c78093220751bcdb804922 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 2 Jul 2023 13:32:18 +0200 Subject: [PATCH] haskell.packages.{ghc88,ghc810}.OneTuple: depend on foldable1-classes-compat For GHC >= 9.0, foldable1-classes-compat is a test only dependency. For GHC < 9.0, OneTuple also depends on it. It is important to add it to the library's build depends as well, so it gets propagated properly to builds of packages that depend on base-compat-batteries (or foldable1-classes-compat will appear as broken to Cabal). --- .../haskell-modules/configuration-ghc-8.10.x.nix | 8 +++++--- .../haskell-modules/configuration-ghc-8.8.x.nix | 8 +++++--- 2 files changed, 10 insertions(+), 6 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 449790a6091f..d4d18fd327cf 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -145,10 +145,12 @@ self: super: { # weeder 2.3.0 no longer supports GHC 8.10 weeder = doDistribute (doJailbreak self.weeder_2_2_0); - # OneTuple needs hashable instead of ghc-prim for GHC < 9 - OneTuple = super.OneTuple.override { + # 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); 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 756b66237e62..ad9b8e5a1d11 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix @@ -148,10 +148,12 @@ self: super: { # has a restrictive lower bound on Cabal fourmolu = doJailbreak super.fourmolu; - # OneTuple needs hashable instead of ghc-prim for GHC < 9 - OneTuple = super.OneTuple.override { + # 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; - }; + }); # Temporarily disabled blaze-textual for GHC >= 9.0 causing hackage2nix ignoring it # https://github.com/paul-rouse/mysql-simple/blob/872604f87044ff6d1a240d9819a16c2bdf4ed8f5/Database/MySQL/Internal/Blaze.hs#L4-L10