Skip to content

Commit

Permalink
Give Derivation::tryResolve an evalStore argument
Browse files Browse the repository at this point in the history
This is needed for building CA deriations with a src store / dest store
split. In particular it is needed for Hydra.
  • Loading branch information
Ericson2314 committed Dec 8, 2023
1 parent 194ae13 commit 9b64f7d
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 @@ -568,7 +568,7 @@ void DerivationGoal::inputsRealised()
inputDrvOutputs statefully, sometimes it gets out of sync with
the real source of truth (store). So we query the store
directly if there's a problem. */
return worker.store.queryPartialDerivationOutputMap(drvPath);
return worker.store.queryPartialDerivationOutputMap(drvPath, &worker.evalStore);
});
assert(attempt);
Derivation drvResolved { std::move(*attempt) };
Expand Down
4 changes: 2 additions & 2 deletions src/libstore/derivations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1002,10 +1002,10 @@ static void rewriteDerivation(Store & store, BasicDerivation & drv, const String

}

std::optional<BasicDerivation> Derivation::tryResolve(Store & store) const
std::optional<BasicDerivation> Derivation::tryResolve(Store & store, Store * evalStore) const
{
return tryResolve(store, [&](const StorePath & drvPath) {
return store.queryPartialDerivationOutputMap(drvPath);
return store.queryPartialDerivationOutputMap(drvPath, evalStore);
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/libstore/derivations.hh
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ struct Derivation : BasicDerivation
* 2. Input placeholders are replaced with realized input store
* paths.
*/
std::optional<BasicDerivation> tryResolve(Store & store) const;
std::optional<BasicDerivation> tryResolve(Store & store, Store * evalStore = nullptr) const;

/**
* Like the above, but instead of querying the Nix database for
Expand Down

0 comments on commit 9b64f7d

Please sign in to comment.