Skip to content

There is no way to override the effects of PR #8043 #15080

@AZMCode

Description

@AZMCode

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


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions