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/Makefile.am2
-rw-r--r--src/nix-instantiate/main.cc34
2 files changed, 2 insertions, 34 deletions
diff --git a/src/nix-instantiate/Makefile.am b/src/nix-instantiate/Makefile.am
index d04fdb3764e8..0726d1296f23 100644
--- a/src/nix-instantiate/Makefile.am
+++ b/src/nix-instantiate/Makefile.am
@@ -4,7 +4,7 @@ nix_instantiate_SOURCES = main.cc help.txt
 nix_instantiate_LDADD = ../libmain/libmain.a ../libexpr/libexpr.a \
  ../libstore/libstore.a ../libutil/libutil.a \
  ../boost/format/libformat.a -L../../externals/inst/lib -ldb_cxx \
- -lsglr -lATB -lconversion -lasfix2 -lmept -lATerm
+ -lATerm
 
 main.o: help.txt.hh
 
diff --git a/src/nix-instantiate/main.cc b/src/nix-instantiate/main.cc
index 305c3b551ca5..cc3444837cd5 100644
--- a/src/nix-instantiate/main.cc
+++ b/src/nix-instantiate/main.cc
@@ -15,31 +15,12 @@ void printHelp()
 }
 
 
-#if 0
-static Path searchPath(const Paths & searchDirs, const Path & relPath)
-{
-    if (string(relPath, 0, 1) == "/") return relPath;
-
-    for (Paths::const_iterator i = searchDirs.begin();
-         i != searchDirs.end(); i++)
-    {
-        Path path = *i + "/" + relPath;
-        if (pathExists(path)) return path;
-    }
-
-    throw Error(
-        format("path `%1%' not found in any of the search directories")
-        % relPath);
-}
-#endif
-
-
 static Expr evalStdin(EvalState & state)
 {
     startNest(nest, lvlTalkative, format("evaluating standard input"));
     string s, s2;
     while (getline(cin, s2)) s += s2 + "\n";
-    Expr e = parseExprFromString(s, absPath("."));
+    Expr e = parseExprFromString(state, s, absPath("."));
     return evalExpr(state, e);
 }
 
@@ -76,24 +57,11 @@ void run(Strings args)
     Strings files;
     bool readStdin = false;
 
-#if 0
-    state.searchDirs.push_back(".");
-    state.searchDirs.push_back(nixDataDir + "/nix");
-#endif
-    
     for (Strings::iterator it = args.begin();
          it != args.end(); )
     {
         string arg = *it++;
 
-#if 0
-        if (arg == "--includedir" || arg == "-I") {
-            if (it == args.end())
-                throw UsageError(format("argument required in `%1%'") % arg);
-            state.searchDirs.push_back(*it++);
-        }
-        else
-#endif
         if (arg == "-")
             readStdin = true;
         else if (arg[0] == '-')