Skip to content

Commit 9449cc4

Browse files
authored
Update stack build (#1965)
Fix building the stack tool by adding `optparse-applicative < 0.18` constraint.
1 parent 158dfa1 commit 9449cc4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

build.nix

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,18 @@ in rec {
4343
"ghc8107" = "3.4.1";
4444
}.${compiler-nix-name} or "latest";
4545
};
46-
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.4" < 0) {
47-
stack = tool compiler-nix-name "stack" { version = "2.9.3"; inherit evalPackages; };
46+
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.6" < 0) {
47+
stack =
48+
tool compiler-nix-name "stack" {
49+
cabalProjectLocal = ''
50+
constraints: optparse-applicative <0.18
51+
'';
52+
version =
53+
if __compareVersions haskell.compiler.${compiler-nix-name}.version "9.2" < 0
54+
then "2.9.3"
55+
else "2.11.1";
56+
inherit evalPackages;
57+
};
4858
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.6" < 0) {
4959
hls-latest = tool compiler-nix-name "haskell-language-server" {
5060
inherit evalPackages;

0 commit comments

Comments
 (0)