Permalink
Browse files

nix-shell: Set $IN_NIX_SHELL before evaluating

  • Loading branch information...
edolstra committed Jan 13, 2014
1 parent f4013b6 commit ea59f39326c8e9dc42dfed4bcbf597fbce58797c
Showing with 2 additions and 2 deletions.
  1. +2 −2 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

0 comments on commit ea59f39

Please sign in to comment.