mirror of
https://github.com/NixOS/nix
synced 2025-06-29 06:21:14 +02:00
writeDerivation
just needs a plain store reference
This commit is contained in:
parent
4d77513d97
commit
35e6288be1
4 changed files with 7 additions and 7 deletions
|
@ -61,7 +61,7 @@ bool BasicDerivation::isBuiltin() const
|
|||
}
|
||||
|
||||
|
||||
StorePath writeDerivation(ref<Store> store,
|
||||
StorePath writeDerivation(Store & store,
|
||||
const Derivation & drv, RepairFlag repair)
|
||||
{
|
||||
auto references = drv.inputSrcs;
|
||||
|
@ -71,10 +71,10 @@ StorePath writeDerivation(ref<Store> store,
|
|||
(that can be missing (of course) and should not necessarily be
|
||||
held during a garbage collection). */
|
||||
auto suffix = std::string(drv.name) + drvExtension;
|
||||
auto contents = drv.unparse(*store, false);
|
||||
auto contents = drv.unparse(store, false);
|
||||
return settings.readOnlyMode
|
||||
? store->computeStorePathForText(suffix, contents, references)
|
||||
: store->addTextToStore(suffix, contents, references, repair);
|
||||
? store.computeStorePathForText(suffix, contents, references)
|
||||
: store.addTextToStore(suffix, contents, references, repair);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue