nix-shell: Set $IN_NIX_SHELL
This allows scripts to distinguish between a real build and a Nix shell.
This commit is contained in:
parent
48858ad5ca
commit
15e5ac8039
1 changed files with 2 additions and 0 deletions
|
@ -188,6 +188,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
|
||||
|
|
Loading…
Reference in a new issue