-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Describe the bug
When using nix develop, the $SHELL env variable is hardcoded to the derivation shell.
This breaks any development workflow which depends on spawning interactive subshells using the $SHELL variable.
There is no way to override this behaviour.
Steps To Reproduce
Enter an mkShell using nix-develop
Expected behavior
There exists a way to set the SHELL environment variable for a nix develop shell.
Metadata
nix-env (Nix) 2.31.2+2
Additional context
This particular problem has been brought up before, just in the context of launching another non-bash shell.
in PR #8043.
This is done to avoid breaking build processes (like Makefiles) that depend on $SHELL to be set to the derivation-building shell.
However, on the flipside, this also breaks any attempt to launch an interactive bash $SHELL, as many editors and IDEs tend to do.
This breaks a very common workflow of entering a nix develop shell, launching an IDE (nvim in my case), then launching a subshell from it, which often is hardcoded to "$SHELL" or has to be custom configured specifically to workaround this.
Checklist
- checked latest Nix manual (source)
- checked open bug issues and pull requests for possible duplicates
Add 👍 to issues you find important.