summary refs log tree commit diff
path: root/src/nix-instantiate
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-11-22 18:45:56 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-11-22 18:45:56 +0000
commitab0bc4999a49efbc8e1c25989662a96e32fa0cc5 (patch)
tree3864cf300fccb46a97decd2d00b8176c047a87d0 /src/nix-instantiate
parent40d9eb14dfb842c51e9f86818b43ae7711e1a5d6 (diff)
downloadguix-ab0bc4999a49efbc8e1c25989662a96e32fa0cc5.tar.gz
* Maintain integrity of the substitute and successor mappings when
  deleting a path in the store.
* Allow absolute paths in Nix expressions.
* Get nix-prefetch-url to work again.
* Various other fixes.

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 aa6883ff84..f63789fc4b 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);
 }