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:
parent
84a8b5e9af
commit
b632153ebd
2 changed files with 14 additions and 7 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue