mirror of
https://github.com/NixOS/nix.git
synced 2025-11-26 04:00:59 +01:00
In the middle of adding state references to derivations and the db...
This commit is contained in:
parent
5e59387d40
commit
bdecf3bdbc
16 changed files with 190 additions and 191 deletions
|
|
@ -760,6 +760,7 @@ static Expr prim_toFile(EvalState & state, const ATermVector & args)
|
|||
string contents = evalString(state, args[1], context);
|
||||
|
||||
PathSet refs;
|
||||
PathSet stateRefs; //TODO TODO TODO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
for (PathSet::iterator i = context.begin(); i != context.end(); ++i) {
|
||||
if (isDerivation(*i))
|
||||
|
|
@ -768,8 +769,8 @@ static Expr prim_toFile(EvalState & state, const ATermVector & args)
|
|||
}
|
||||
|
||||
Path storePath = readOnlyMode
|
||||
? computeStorePathForText(name, contents, refs)
|
||||
: store->addTextToStore(name, contents, refs);
|
||||
? computeStorePathForText(name, contents, refs, stateRefs)
|
||||
: store->addTextToStore(name, contents, refs, stateRefs);
|
||||
|
||||
/* Note: we don't need to add `context' to the context of the
|
||||
result, since `storePath' itself has references to the paths
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue