1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-02 05:11:47 +02:00

Make the store directory a member variable of Store

This commit is contained in:
Eelco Dolstra 2016-06-01 14:49:12 +02:00
parent 1b5b654fe2
commit 7850d3d279
35 changed files with 315 additions and 296 deletions

View file

@ -81,7 +81,7 @@ Path writeDerivation(ref<Store> store,
string suffix = name + drvExtension;
string contents = drv.unparse();
return settings.readOnlyMode
? computeStorePathForText(suffix, contents, references)
? store->computeStorePathForText(suffix, contents, references)
: store->addTextToStore(suffix, contents, references, repair);
}
@ -336,7 +336,7 @@ PathSet BasicDerivation::outputPaths() const
}
Source & operator >> (Source & in, BasicDerivation & drv)
Source & readDerivation(Source & in, Store & store, BasicDerivation & drv)
{
drv.outputs.clear();
auto nr = readInt(in);
@ -344,11 +344,11 @@ Source & operator >> (Source & in, BasicDerivation & drv)
auto name = readString(in);
DerivationOutput o;
in >> o.path >> o.hashAlgo >> o.hash;
assertStorePath(o.path);
store.assertStorePath(o.path);
drv.outputs[name] = o;
}
drv.inputSrcs = readStorePaths<PathSet>(in);
drv.inputSrcs = readStorePaths<PathSet>(store, in);
in >> drv.platform >> drv.builder;
drv.args = readStrings<Strings>(in);