mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Allow setting the state directory as a store parameter
E.g. "local?store=/tmp/store&state=/tmp/var".
This commit is contained in:
parent
f2682e6e18
commit
812c0dfbe2
13 changed files with 112 additions and 77 deletions
|
@ -79,7 +79,9 @@ void processExpr(EvalState & state, const Strings & attrPaths,
|
|||
else {
|
||||
Path rootName = gcRoot;
|
||||
if (++rootNr > 1) rootName += "-" + std::to_string(rootNr);
|
||||
drvPath = state.store->addPermRoot(drvPath, rootName, indirectRoot);
|
||||
auto store2 = state.store.dynamic_pointer_cast<LocalFSStore>();
|
||||
if (store2)
|
||||
drvPath = store2->addPermRoot(drvPath, rootName, indirectRoot);
|
||||
}
|
||||
std::cout << format("%1%%2%\n") % drvPath % (outputName != "out" ? "!" + outputName : "");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue