stack: provide hpack 0.38.1 to match upstream binaries

This commit is contained in:
sternenseemann
2025-09-21 15:28:05 +02:00
parent 6d1eafeb4c
commit 4ede35a36f
4 changed files with 158 additions and 12 deletions
@@ -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 =
@@ -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
- network-run == 0.4.0 # 2024-10-20: for GHC 9.10/network == 3.1.*
@@ -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 [ ] ++ [
+135
View File
@@ -340850,6 +340850,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,