mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
propagate NIX_BUILD_SHELL also in pure builds document NIX_BUILD_SHELL in the nix-shell command documentation
This commit is contained in:
parent
80ebd60e7c
commit
0eb200e569
2 changed files with 17 additions and 1 deletions
|
@ -270,7 +270,7 @@ foreach my $expr (@exprs) {
|
|||
my $tmp = $ENV{"TMPDIR"} // $ENV{"XDG_RUNTIME_DIR"} // "/tmp";
|
||||
if ($pure) {
|
||||
foreach my $name (keys %ENV) {
|
||||
next if grep { $_ eq $name } ("HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM", "IN_NIX_SHELL", "TZ", "PAGER");
|
||||
next if grep { $_ eq $name } ("HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM", "IN_NIX_SHELL", "TZ", "PAGER", "NIX_BUILD_SHELL");
|
||||
delete $ENV{$name};
|
||||
}
|
||||
# NixOS hack: prevent /etc/bashrc from sourcing /etc/profile.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue