diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 6da545b0bc181..95ba7d8e4fe8c 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2228,12 +2228,15 @@ with haskellLib; # stack-3.7.1 requires Cabal < 3.12 stack = + let + stack' = super.stack.overrideScope (self: super: { hpack = self.hpack_0_38_1; }); + in if lib.versionOlder self.ghc.version "9.10" then - super.stack + stack' else lib.pipe # to reduce rebuilds, don't override Cabal in the entire scope - ((super.stack.override { Cabal = self.Cabal_3_10_3_0; }).overrideScope ( + ((stack'.override { Cabal = self.Cabal_3_10_3_0; }).overrideScope ( self: super: let downgradeCabal = diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 4dfef1e27b2e4..785fddd3c1992 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -89,6 +89,7 @@ extra-packages: - hasql-pool < 1.1 # 2025-01-19: Needed for building postgrest - hasql-transaction < 1.1.1 # 2025-01-19: Needed for building postgrest - hlint == 3.6.* # 2025-04-14: needed for hls with ghc-lib-parser 9.6 + - hpack == 0.38.1 # 2025-09-18: to match exact version upstream stack-3.7.1 uses - hspec-megaparsec == 2.2.0 # 2023-11-18: Latest version compatible with ghc 9.0 - language-javascript == 0.7.0.0 # required by purescript - lsp < 2.5 # 2024-07-08: need for koka diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 16573cbe50517..297a7a64a5d1e 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1881,16 +1881,23 @@ builtins.intersectAttrs super { extensions = enableSeparateBinOutput super.extensions; # These test cases access the network - hpack = overrideCabal (drv: { - testFlags = drv.testFlags or [ ] ++ [ - "--skip" - "/Hpack.Defaults/ensureFile/with 404/does not create any files/" - "--skip" - "/Hpack.Defaults/ensureFile/downloads file if missing/" - "--skip" - "/EndToEnd/hpack/defaults/fails if defaults don't exist/" - ]; - }) super.hpack; + inherit + (lib.mapAttrs ( + _: + overrideCabal (drv: { + testFlags = drv.testFlags or [ ] ++ [ + "--skip" + "/Hpack.Defaults/ensureFile/with 404/does not create any files/" + "--skip" + "/Hpack.Defaults/ensureFile/downloads file if missing/" + "--skip" + "/EndToEnd/hpack/defaults/fails if defaults don't exist/" + ]; + }) + ) super) + hpack + hpack_0_38_1 + ; doctest = overrideCabal (drv: { testFlags = drv.testFlags or [ ] ++ [ diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 6c207cb876cda..886170a493903 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -340852,6 +340852,141 @@ self: { } ) { }; + hpack_0_38_1 = callPackage ( + { + mkDerivation, + aeson, + base, + bifunctors, + bytestring, + Cabal, + containers, + crypton, + deepseq, + directory, + filepath, + Glob, + hspec, + hspec-discover, + http-client, + http-client-tls, + http-types, + HUnit, + infer-license, + interpolate, + mockery, + mtl, + pretty, + QuickCheck, + scientific, + template-haskell, + temporary, + text, + transformers, + unordered-containers, + vcr, + vector, + yaml, + }: + mkDerivation { + pname = "hpack"; + version = "0.38.1"; + sha256 = "03qygb51jb4r6sg2bkaz7k80h11wgjr27hgpx6h08xm8axdk2gba"; + revision = "1"; + editedCabalFile = "0dyd6pp2pk62nynp0x2j9kjddfv43p9inplk4iya7hdldyjs77k0"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + aeson + base + bifunctors + bytestring + Cabal + containers + crypton + deepseq + directory + filepath + Glob + http-client + http-client-tls + http-types + infer-license + mtl + pretty + scientific + text + transformers + unordered-containers + vector + yaml + ]; + executableHaskellDepends = [ + aeson + base + bifunctors + bytestring + Cabal + containers + crypton + deepseq + directory + filepath + Glob + http-client + http-client-tls + http-types + infer-license + mtl + pretty + scientific + text + transformers + unordered-containers + vector + yaml + ]; + testHaskellDepends = [ + aeson + base + bifunctors + bytestring + Cabal + containers + crypton + deepseq + directory + filepath + Glob + hspec + http-client + http-client-tls + http-types + HUnit + infer-license + interpolate + mockery + mtl + pretty + QuickCheck + scientific + template-haskell + temporary + text + transformers + unordered-containers + vcr + vector + yaml + ]; + testToolDepends = [ hspec-discover ]; + description = "A modern format for Haskell packages"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + mainProgram = "hpack"; + } + ) { }; + hpack = callPackage ( { mkDerivation,