diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-01-06 17:38:04 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-01-06 17:38:04 +0100 |
commit | 405434e084fa994cc957249db7787731e9311fa8 (patch) | |
tree | d3c511a9be1de7c66545625ad88adb670444284a | |
parent | 7a61c88dbb517453f73c5b4ede4a4468e38cae32 (diff) |
Revert "nix-shell: Set $IN_NIX_SHELL before evaluation"
This reverts commit 0c1198cf08576f16633b2344dc6513cefb567cfc.
-rwxr-xr-x | scripts/nix-build.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in index 8b66e38a9..8e6f43a37 100755 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -175,8 +175,6 @@ foreach my $expr (@exprs) { $drvPath = readlink $drvPath or die "cannot read symlink `$drvPath'" if -l $drvPath; my $drv = derivationFromPath($drvPath); - $ENV{'IN_NIX_SHELL'} = 1; - # Build or fetch all dependencies of the derivation. my @inputDrvs = grep { my $x = $_; (grep { $x =~ $_ } @envExclude) == 0 } @{$drv->{inputDrvs}}; system("$Nix::Config::binDir/nix-store", "-r", "--no-output", "--no-gc-warning", @buildArgs, @inputDrvs, @{$drv->{inputSrcs}}) == 0 @@ -195,6 +193,8 @@ foreach my $expr (@exprs) { $ENV{'NIX_STORE'} = $Nix::Config::storeDir; $ENV{$_} = $drv->{env}->{$_} foreach keys %{$drv->{env}}; + $ENV{'IN_NIX_SHELL'} = 1; + # Run a shell using the derivation's environment. For # convenience, source $stdenv/setup to setup additional # environment variables and shell functions. Also don't lose |