Skip to content

Add which to all shell environments#234

Merged
angerman merged 1 commit into
mainfrom
fix/cacert-for-curl
Feb 26, 2026
Merged

Add which to all shell environments#234
angerman merged 1 commit into
mainfrom
fix/cacert-for-curl

Conversation

@angerman
Copy link
Copy Markdown
Collaborator

@angerman angerman commented Feb 26, 2026

Summary

GHC's build system (mk/boilerplate.mk:182) uses which to locate ghc. After the switch to devShellTools + source "$stdenv/setup" (a354771), the -env scripts build a hermetic PATH from stdenv's initialPath and the declared buildInputs/nativeBuildInputs. Since which is not part of stdenv's initialPath and was never explicitly listed, it is missing — causing CI failures:

make[1]: which: No such file or directory
../mk/boilerplate.mk:182: *** Cannot find ghc: .  Stop.

Add pkgs.which to all four shell definitions (dynamic, static, cross-js, cross-windows).

Test plan

  • nix develop .#ghc98-minimal-ghc -c which which/nix/store/...-which-2.23/bin/which
  • CI: GHC testsuite/timeout builds without Cannot find ghc error

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).
@angerman angerman force-pushed the fix/cacert-for-curl branch from b9fe78e to 3725e1f Compare February 26, 2026 00:32
@angerman angerman changed the title Fix SSL certificates and add missing tools for devShellTools-based environments Add which to all shell environments Feb 26, 2026
@angerman angerman added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit 39cea88 Feb 26, 2026
836 of 884 checks passed
@angerman angerman deleted the fix/cacert-for-curl branch February 26, 2026 01:16
@angerman angerman mentioned this pull request Feb 26, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant