Skip to content

Commit 39cea88

Browse files
authored
Add which to all shell environments (#234)
GHC's build system (mk/boilerplate.mk:182) uses `which` to locate ghc. After commit a354771 switched from recursive-nix `nix print-dev-env` to `devShellTools.unstructuredDerivationInputEnv`, `which` was no longer transitively included. This caused CI failures: make[1]: which: No such file or directory ../mk/boilerplate.mk:182: *** Cannot find ghc: . Stop. Add pkgs.which explicitly to nativeBuildInputs/buildInputs in all four shell definitions (dynamic, static, cross-js, cross-windows).
1 parent 3fe5796 commit 39cea88

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

cross-js.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ pkgs.mkShell ({
100100
(pkgs.pkg-config or pkgconfig)
101101
(tool "happy")
102102
(tool "alex")
103-
stdenv.cc.cc.lib ]) ++ (with pkgs.buildPackages; [
103+
stdenv.cc.cc.lib
104+
which
105+
]) ++ (with pkgs.buildPackages; [
104106
])
105107
++ builtins.attrValues haskell-tools
106108
++ pkgs.lib.optional withIOG

cross-windows.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ pkgs.pkgsBuildBuild.mkShell ({
205205
(pkgsBuildBuild.pkg-config or pkgsBuildBuild.pkgconfig)
206206
(tool "happy")
207207
(tool "alex")
208-
stdenv.cc.cc.lib ])
208+
stdenv.cc.cc.lib
209+
pkgsBuildBuild.which
210+
])
209211
++ map pkgs.lib.getDev (with pkgs; [
210212
zlib pcre openssl
211213
windows.mcfgthreads

dynamic.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ pkgs.mkShell {
122122
openssl
123123
pcre
124124
pkg-config
125+
which
125126
zlib
126127
])
127128
++ optional stdenv.hostPlatform.isLinux pkgs.systemd

static.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ pkgs.mkShell (rec {
158158
(compiler.override { enableShared = true; })
159159
] ++ (with pkgs; [
160160
(pkgs.pkg-config or pkgconfig)
161-
stdenv.cc.cc.lib ]) ++ (with pkgs.buildPackages; [
161+
stdenv.cc.cc.lib
162+
which
163+
]) ++ (with pkgs.buildPackages; [
162164
])
163165
++ builtins.attrValues haskell-tools
164166
++ pkgs.lib.optional withIOG (with pkgs; [ cddl cbor-diag ])

0 commit comments

Comments
 (0)