about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nix-instantiate/nix-instantiate.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc
index adc8ca623807..d86c9fc84572 100644
--- a/src/nix-instantiate/nix-instantiate.cc
+++ b/src/nix-instantiate/nix-instantiate.cc
@@ -148,7 +148,8 @@ void run(Strings args)
         Expr * e = parseStdin(state);
         processExpr(state, attrPaths, parseOnly, strict, autoArgs,
             evalOnly, xmlOutput, xmlOutputSourceLocation, e);
-    }
+    } else if (files.empty())
+        files.push_back("./default.nix");
 
     foreach (Strings::iterator, i, files) {
         Expr * e = state.parseExprFromFile(lookupFileArg(state, *i));