mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
nix-shell: Set $IN_NIX_SHELL before evaluating
This commit is contained in:
parent
f4013b6189
commit
ea59f39326
1 changed files with 2 additions and 2 deletions
|
@ -152,6 +152,8 @@ for (my $n = 0; $n < scalar @ARGV; $n++) {
|
||||||
|
|
||||||
@exprs = ("./default.nix") if scalar @exprs == 0;
|
@exprs = ("./default.nix") if scalar @exprs == 0;
|
||||||
|
|
||||||
|
$ENV{'IN_NIX_SHELL'} = 1 if $runEnv;
|
||||||
|
|
||||||
|
|
||||||
foreach my $expr (@exprs) {
|
foreach my $expr (@exprs) {
|
||||||
|
|
||||||
|
@ -193,8 +195,6 @@ foreach my $expr (@exprs) {
|
||||||
$ENV{'NIX_STORE'} = $Nix::Config::storeDir;
|
$ENV{'NIX_STORE'} = $Nix::Config::storeDir;
|
||||||
$ENV{$_} = $drv->{env}->{$_} foreach keys %{$drv->{env}};
|
$ENV{$_} = $drv->{env}->{$_} foreach keys %{$drv->{env}};
|
||||||
|
|
||||||
$ENV{'IN_NIX_SHELL'} = 1;
|
|
||||||
|
|
||||||
# Run a shell using the derivation's environment. For
|
# Run a shell using the derivation's environment. For
|
||||||
# convenience, source $stdenv/setup to setup additional
|
# convenience, source $stdenv/setup to setup additional
|
||||||
# environment variables and shell functions. Also don't lose
|
# environment variables and shell functions. Also don't lose
|
||||||
|
|
Loading…
Reference in a new issue