Skip to content

Commit

Permalink
Give Store::queryDerivationOutputMap and evalStore argument
Browse files Browse the repository at this point in the history
Picking up where NixOS#9563 left off.
  • Loading branch information
Ericson2314 committed Dec 10, 2023
1 parent b7e016a commit 61dd401
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libstore/build/derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ void DerivationGoal::inputsRealised()
return *outPath;
}
else {
auto outMap = worker.evalStore.queryDerivationOutputMap(depDrvPath);
auto outMap = worker.store.queryDerivationOutputMap(depDrvPath, &worker.evalStore);
auto outMapPath = outMap.find(outputName);
if (outMapPath == outMap.end()) {
throw Error(
Expand Down
4 changes: 2 additions & 2 deletions src/libstore/store-api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,8 @@ std::map<std::string, std::optional<StorePath>> Store::queryPartialDerivationOut
return outputs;
}

OutputPathMap Store::queryDerivationOutputMap(const StorePath & path) {
auto resp = queryPartialDerivationOutputMap(path);
OutputPathMap Store::queryDerivationOutputMap(const StorePath & path, Store * evalStore) {
auto resp = queryPartialDerivationOutputMap(path, evalStore);
OutputPathMap result;
for (auto & [outName, optOutPath] : resp) {
if (!optOutPath)
Expand Down
2 changes: 1 addition & 1 deletion src/libstore/store-api.hh
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public:
* Query the mapping outputName=>outputPath for the given derivation.
* Assume every output has a mapping and throw an exception otherwise.
*/
OutputPathMap queryDerivationOutputMap(const StorePath & path);
OutputPathMap queryDerivationOutputMap(const StorePath & path, Store * evalStore = nullptr);

/**
* Query the full store path given the hash part of a valid store
Expand Down

0 comments on commit 61dd401

Please sign in to comment.