about summary refs log tree commit diff
path: root/scripts/nix-build.in
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-10T09·25+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-10T09·25+0100
commitb632153ebd1bf8d773872eb36f9ad335d2c89fab (patch)
tree51dfe45aa8e9093e66c11f83e6313cbdff32b343 /scripts/nix-build.in
parent84a8b5e9af2df4ed7f7860a6768daf83f72724ca (diff)
nix-shell: Use shell.nix as the default expression if it exists
Diffstat (limited to 'scripts/nix-build.in')
-rwxr-xr-xscripts/nix-build.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index 168730bbc92d..fff71021fbf8 100755
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -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;