aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/worker.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/build/worker.hh')
-rw-r--r--src/libstore/build/worker.hh11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libstore/build/worker.hh b/src/libstore/build/worker.hh
index 097e73cf7..1953bbec1 100644
--- a/src/libstore/build/worker.hh
+++ b/src/libstore/build/worker.hh
@@ -2,6 +2,7 @@
///@file
#include "async-semaphore.hh"
+#include "concepts.hh"
#include "notifying-counter.hh"
#include "types.hh"
#include "lock.hh"
@@ -240,9 +241,13 @@ public:
* @ref DerivationGoal "derivation goal"
*/
private:
- std::pair<std::shared_ptr<DerivationGoal>, kj::Promise<void>> makeDerivationGoalCommon(
- const StorePath & drvPath, const OutputsSpec & wantedOutputs,
- std::function<std::unique_ptr<DerivationGoal>()> mkDrvGoal);
+ template<typename ID, std::derived_from<Goal> G>
+ std::pair<std::shared_ptr<G>, kj::Promise<void>> makeGoalCommon(
+ std::map<ID, CachedGoal<G>> & map,
+ const ID & key,
+ InvocableR<std::unique_ptr<G>> auto create,
+ std::invocable<G &> auto modify
+ );
std::pair<std::shared_ptr<DerivationGoal>, kj::Promise<void>> makeDerivationGoal(
const StorePath & drvPath,
const OutputsSpec & wantedOutputs, BuildMode buildMode = bmNormal) override;