Skip to content

Commit a411091

Browse files
authored
Fix for stack and http-download 0.2.1 issue (input-output-hk#2023)
See commercialhaskell/stack#6210
1 parent bf6e78f commit a411091

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

modules/hackage-quirks.nix

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,18 @@ in [
4545

4646
# Avoid pantry 0.9 in versions without https://github.com/commercialhaskell/stack/pull/6187
4747
# Also avoid optparse-applicative 0.18
48+
# http-download 0.2.1 https://github.com/commercialhaskell/stack/issues/6210
4849
({config, lib, pkgs, ...}:
4950
{ _file = "haskell.nix/overlays/hackage-quirks.nix#stack"; } //
50-
lib.mkIf (config.name == "stack" && builtins.compareVersions config.version "2.11.1" <= 0) {
51-
cabalProjectLocal = ''
52-
constraints: pantry <0.9, optparse-applicative <0.18
53-
'';
51+
lib.mkIf (config.name == "stack") {
52+
cabalProjectLocal =
53+
if builtins.compareVersions config.version "2.11.1" <= 0 then ''
54+
constraints: pantry <0.9, optparse-applicative <0.18, http-download <0.2.1
55+
''
56+
else if builtins.compareVersions config.version "2.11.1.1" <= 0 then ''
57+
constraints: http-download <0.2.1
58+
''
59+
else "";
5460
}
5561
)
5662

0 commit comments

Comments
 (0)