diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 9911b5243a90..fc9041485aac 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1021,17 +1021,22 @@ self: super: { })); ormolu = generateOptparseApplicativeCompletion "ormolu" super.ormolu; - # Currently only builds with GHC-8.10.7 and old aeson: - # https://github.com/commercialhaskell/stack/issues/5670 - # https://github.com/commercialhaskell/stack/issues/5558 stack = generateOptparseApplicativeCompletion "stack" - (super.stack.overrideScope (self: super: { - # pantry-0.5.2.1 requires aeson < 2. - aeson = self.aeson_1_5_6_0; - # stack-2.7.3 requires old version of pantry. - pantry = self.pantry_0_5_2_1; - })); + (doJailbreak # for Cabal constraint added on hackage + (appendPatch + (pkgs.fetchpatch { + # https://github.com/commercialhaskell/stack/pull/5559 + # When removing, also remove doJailbreak. + name = "stack-pull-5559.patch"; + url = "https://github.com/hercules-ci/stack/compare/v2.7.5...brandon-leapyear/chinn/cabal-0.patch"; + sha256 = "sha256-OXmdGgQ2KSKtQKOK6eePLgvUOTlzac544HQYKJpcjnU="; + }) + (super.stack.overrideScope (self: super: { + # stack 2.7.5 requires aeson <= 1.6. + aeson = self.aeson_1_5_6_0; + })) + )); # Too strict version bound on hashable-time. # Tests require newer package version. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 734e6276b874..1e36a74d8013 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12553,10 +12553,7 @@ with pkgs; cabal-install = haskell.lib.compose.justStaticExecutables haskellPackages.cabal-install; - # stack doesn't build with ghc902 (Cabal-3.4) yet: - # https://github.com/commercialhaskell/stack/issues/5670 - # https://github.com/commercialhaskell/stack/issues/5558 - stack = haskell.lib.compose.justStaticExecutables haskell.packages.ghc8107.stack; + stack = haskell.lib.compose.justStaticExecutables haskellPackages.stack; hlint = haskell.lib.compose.justStaticExecutables haskellPackages.hlint;