aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/misc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/misc.cc')
-rw-r--r--src/libstore/misc.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc
index 1035691c7..c8646083b 100644
--- a/src/libstore/misc.cc
+++ b/src/libstore/misc.cc
@@ -330,8 +330,11 @@ std::map<DrvOutput, StorePath> drvOutputReferences(
std::map<DrvOutput, StorePath> drvOutputReferences(
Store & store,
const Derivation & drv,
- const StorePath & outputPath)
+ const StorePath & outputPath,
+ Store * evalStore_)
{
+ auto & evalStore = evalStore_ ? *evalStore_ : store;
+
std::set<Realisation> inputRealisations;
std::function<void(const StorePath &, const DerivedPathMap<StringSet>::ChildNode &)> accumRealisations;
@@ -339,7 +342,7 @@ std::map<DrvOutput, StorePath> drvOutputReferences(
accumRealisations = [&](const StorePath & inputDrv, const DerivedPathMap<StringSet>::ChildNode & inputNode) {
if (!inputNode.value.empty()) {
auto outputHashes =
- staticOutputHashes(store, store.readDerivation(inputDrv));
+ staticOutputHashes(evalStore, evalStore.readDerivation(inputDrv));
for (const auto & outputName : inputNode.value) {
auto outputHash = get(outputHashes, outputName);
if (!outputHash)
@@ -361,7 +364,7 @@ std::map<DrvOutput, StorePath> drvOutputReferences(
SingleDerivedPath next = SingleDerivedPath::Built { d, outputName };
accumRealisations(
// TODO deep resolutions for dynamic derivations, issue #8947, would go here.
- resolveDerivedPath(store, next),
+ resolveDerivedPath(store, next, evalStore_),
childNode);
}
}