diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-04 07:15:08 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 07:15:08 +0100 |
commit | 13f78c557b402422aefc09cc217b001d83f08baa (patch) | |
tree | 09cd9c8708df37bbc9bdfddcc26f20d82320e4b3 /src/libstore/misc.cc | |
parent | bc34274aae277bb5b05d3e833fbdc0bd30c7250a (diff) |
Merge pull request #9589 from obsidiansystems/floating-content-addressing-derivations-eval-store
Fix building CA derivations with and eval store
(cherry picked from commit dfc0cee7024a082d90a4f68296f55a82dfd52126)
Change-Id: I28feb5a36d4fe75f0ed3e3e2db6eb56b67d0f371
Diffstat (limited to 'src/libstore/misc.cc')
-rw-r--r-- | src/libstore/misc.cc | 9 |
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); } } |