about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-23T12·27+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-23T12·34+0100
commit7fdee6e13695a1e85b0b3f476a33a9e934af3f0b (patch)
tree95ea01712e99ecb0acf906ac4de41d21bddbbd2f /scripts
parent5ef8508a92997dbd7f8aa501b64fd283fb1c7bb8 (diff)
nix-build: Refactor
Diffstat (limited to 'scripts')
-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 07752f144f1d..46a8e37315fc 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" || $name eq "IN_NIX_SHELL";
+                next if grep { $_ eq $name } ("HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM", "IN_NIX_SHELL");
                 delete $ENV{$name};
             }
             # NixOS hack: prevent /etc/bashrc from sourcing /etc/profile.