aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-build.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-build.in')
-rwxr-xr-xscripts/nix-build.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index ea099532b..b4bb2fc3f 100755
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -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.