aboutsummaryrefslogtreecommitdiff
path: root/src/nix-instantiate/nix-instantiate.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-11 16:14:42 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-11 16:14:42 +0100
commitae4a3cfa030438ca05ad3bf61fa301dee6c1dbb5 (patch)
tree1b363a7b9d4d6f5c34e64d9cc00e879532b28d00 /src/nix-instantiate/nix-instantiate.cc
parentfd205fb6f8edc73a0d867a6dfc5a34737bae6bb9 (diff)
Move addPermRoot into Store
Diffstat (limited to 'src/nix-instantiate/nix-instantiate.cc')
-rw-r--r--src/nix-instantiate/nix-instantiate.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc
index 1604c0817..81c1c8d56 100644
--- a/src/nix-instantiate/nix-instantiate.cc
+++ b/src/nix-instantiate/nix-instantiate.cc
@@ -32,7 +32,7 @@ static bool indirectRoot = false;
enum OutputKind { okPlain, okXML, okJSON };
-void processExpr(ref<Store> store, EvalState & state, const Strings & attrPaths,
+void processExpr(EvalState & state, const Strings & attrPaths,
bool parseOnly, bool strict, Bindings & autoArgs,
bool evalOnly, OutputKind output, bool location, Expr * e)
{
@@ -79,7 +79,7 @@ void processExpr(ref<Store> store, EvalState & state, const Strings & attrPaths,
else {
Path rootName = gcRoot;
if (++rootNr > 1) rootName += "-" + std::to_string(rootNr);
- drvPath = addPermRoot(store, drvPath, rootName, indirectRoot);
+ drvPath = state.store->addPermRoot(drvPath, rootName, indirectRoot);
}
std::cout << format("%1%%2%\n") % drvPath % (outputName != "out" ? "!" + outputName : "");
}
@@ -177,7 +177,7 @@ int main(int argc, char * * argv)
if (readStdin) {
Expr * e = parseStdin(state);
- processExpr(store, state, attrPaths, parseOnly, strict, autoArgs,
+ processExpr(state, attrPaths, parseOnly, strict, autoArgs,
evalOnly, outputKind, xmlOutputSourceLocation, e);
} else if (files.empty() && !fromArgs)
files.push_back("./default.nix");
@@ -186,7 +186,7 @@ int main(int argc, char * * argv)
Expr * e = fromArgs
? state.parseExprFromString(i, absPath("."))
: state.parseExprFromFile(resolveExprPath(lookupFileArg(state, i)));
- processExpr(store, state, attrPaths, parseOnly, strict, autoArgs,
+ processExpr(state, attrPaths, parseOnly, strict, autoArgs,
evalOnly, outputKind, xmlOutputSourceLocation, e);
}