diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-01-13 13:42:29 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-01-13 13:43:31 +0100 |
commit | ea59f39326c8e9dc42dfed4bcbf597fbce58797c (patch) | |
tree | 630ccb16df27000f5fe1cf27fad9382e38d7a624 /scripts | |
parent | f4013b6189af731af42f99684ed7721076a54a0d (diff) | |
download | guix-ea59f39326c8e9dc42dfed4bcbf597fbce58797c.tar.gz |
nix-shell: Set $IN_NIX_SHELL before evaluating
Diffstat (limited to 'scripts')
-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 8e6f43a373..5d57692466 100755 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -152,6 +152,8 @@ for (my $n = 0; $n < scalar @ARGV; $n++) { @exprs = ("./default.nix") if scalar @exprs == 0; +$ENV{'IN_NIX_SHELL'} = 1 if $runEnv; + foreach my $expr (@exprs) { @@ -193,8 +195,6 @@ 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 |