1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

nix-shell: Use shell.nix as the default expression if it exists

This commit is contained in:
Eelco Dolstra 2014-02-10 10:25:13 +01:00
parent 84a8b5e9af
commit b632153ebd
2 changed files with 14 additions and 7 deletions

View file

@ -149,7 +149,8 @@ for (my $n = 0; $n < scalar @ARGV; $n++) {
}
}
@exprs = ("./default.nix") if scalar @exprs == 0;
@exprs = ("shell.nix") if scalar @exprs == 0 && $runEnv && -e "shell.nix";
@exprs = ("default.nix") if scalar @exprs == 0;
$ENV{'IN_NIX_SHELL'} = 1 if $runEnv;