about summary refs log tree commit diff
path: root/src/nix-instantiate
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-instantiate')
-rw-r--r--src/nix-instantiate/main.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nix-instantiate/main.cc b/src/nix-instantiate/main.cc
index aa6883ff84b8..f63789fc4b4a 100644
--- a/src/nix-instantiate/main.cc
+++ b/src/nix-instantiate/main.cc
@@ -5,6 +5,7 @@
 #include "normalise.hh"
 #include "shared.hh"
 #include "eval.hh"
+#include "parser.hh"
 
 
 #if 0
@@ -29,9 +30,9 @@ static Path searchPath(const Paths & searchDirs, const Path & relPath)
 static Expr evalStdin(EvalState & state)
 {
     startNest(nest, lvlTalkative, format("evaluating standard input"));
-    Expr e = ATreadFromFile(stdin);
-    if (!e) 
-        throw Error(format("unable to read a term from stdin"));
+    string s, s2;
+    while (getline(cin, s2)) s += s2 + "\n";
+    Expr e = parseExprFromString(s, absPath("."));
     return evalExpr(state, e);
 }