aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-23 15:11:10 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-23 15:11:10 +0000
commitb0b59fd05a1b003536f498c906350f5e1052d218 (patch)
tree86acc2375589f408e0c415b178cf49fc2a9755dc /src/libstore
parent3a7b330b64c6ea77e18a0a96aad7fb14947382d9 (diff)
parent35e6288be1a2384a29caccd64d88a6b623e6c033 (diff)
Merge remote-tracking branch 'obsidian/write-derivation-borrow' into HEAD
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/derivations.cc8
-rw-r--r--src/libstore/derivations.hh2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index 5319c1a38..34541227b 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -68,7 +68,7 @@ bool BasicDerivation::isBuiltin() const
}
-StorePath writeDerivation(ref<Store> store,
+StorePath writeDerivation(Store & store,
const Derivation & drv, RepairFlag repair)
{
auto references = drv.inputSrcs;
@@ -78,10 +78,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);
}
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index 76f983561..b09480e1e 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -136,7 +136,7 @@ class Store;
enum RepairFlag : bool { NoRepair = false, Repair = true };
/* Write a derivation to the Nix store, and return its path. */
-StorePath writeDerivation(ref<Store> store,
+StorePath writeDerivation(Store & store,
const Derivation & drv, RepairFlag repair = NoRepair);
/* Read a derivation from a file. */