Merge pull request #5101 from fzakaria/faridzakaria/fix-nix-shell
nix-shell --pure: Let it work for any derivation
This commit is contained in:
commit
27444d40cf
1 changed files with 3 additions and 0 deletions
|
@ -489,6 +489,9 @@ static void main_nix_build(int argc, char * * argv)
|
|||
"_nix_shell_clean_tmpdir; ") +
|
||||
(pure ? "" : "[ -n \"$PS1\" ] && [ -e ~/.bashrc ] && source ~/.bashrc;") +
|
||||
"%2%"
|
||||
// always clear PATH.
|
||||
// when nix-shell is run impure, we rehydrate it with the `p=$PATH` above
|
||||
"unset PATH;"
|
||||
"dontAddDisableDepTrack=1;\n"
|
||||
+ structuredAttrsRC +
|
||||
"\n[ -e $stdenv/setup ] && source $stdenv/setup; "
|
||||
|
|
Loading…
Reference in a new issue