From 5ba5993470a6ad532fc8e842084a574a88876b0a Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 30 Dec 2013 07:58:14 -0500 Subject: [PATCH] nix-shell --pure: Don't clear IN_NIX_SHELL Signed-off-by: Shea Levy --- scripts/nix-build.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nix-build.in b/scripts/nix-build.in index fe22058f6..8b66e38a9 100755 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -185,7 +185,7 @@ foreach my $expr (@exprs) { # Set the environment. if ($pure) { foreach my $name (keys %ENV) { - next if $name eq "HOME" || $name eq "USER" || $name eq "LOGNAME" || $name eq "DISPLAY" || $name eq "PATH" || $name eq "TERM"; + next if $name eq "HOME" || $name eq "USER" || $name eq "LOGNAME" || $name eq "DISPLAY" || $name eq "PATH" || $name eq "TERM" || $name eq "IN_NIX_SHELL"; delete $ENV{$name}; } # NixOS hack: prevent /etc/bashrc from sourcing /etc/profile.