mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
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