From 7b01c8b8cd5f66e12df90e40b1ff009fed3079bf Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 15 Feb 2025 13:34:38 -0500 Subject: [PATCH] WIP rework goals --- src/libstore/build/build-trace-goal.cc | 208 ++++++++++++++++++ ...erivation-creation-and-realisation-goal.cc | 2 +- src/libstore/build/derivation-goal.cc | 2 +- .../build/derivation-resolution-goal.cc | 82 +++++++ .../build/drv-output-substitution-goal.cc | 105 ++------- src/libstore/build/worker.cc | 39 ++++ src/libstore/ca-specific-schema.sql | 6 +- src/libstore/derived-path-map.cc | 4 +- .../nix/store/build/build-trace-goal.hh | 54 +++++ .../store/build/derivation-resolution-goal.hh | 60 +++++ .../build/drv-output-substitution-goal.hh | 6 - .../include/nix/store/build/worker.hh | 23 +- src/libstore/include/nix/store/meson.build | 2 + src/libstore/meson.build | 3 + 14 files changed, 498 insertions(+), 98 deletions(-) create mode 100644 src/libstore/build/build-trace-goal.cc create mode 100644 src/libstore/build/derivation-resolution-goal.cc create mode 100644 src/libstore/include/nix/store/build/build-trace-goal.hh create mode 100644 src/libstore/include/nix/store/build/derivation-resolution-goal.hh diff --git a/src/libstore/build/build-trace-goal.cc b/src/libstore/build/build-trace-goal.cc new file mode 100644 index 000000000..34af04b68 --- /dev/null +++ b/src/libstore/build/build-trace-goal.cc @@ -0,0 +1,208 @@ +#include "nix/store/build/build-trace-goal.hh" +#include "nix/util/finally.hh" +#include "nix/store/build/worker.hh" +#include "nix/store/build/substitution-goal.hh" +#include "nix/util/callback.hh" +#include "nix/util/util.hh" +#include "nix/store/derivations.hh" +#include "nix/store/store-open.hh" +#include "nix/store/build/derivation-resolution-goal.hh" + +namespace nix { + +BuildTraceGoal::BuildTraceGoal(const SingleDerivedPath::Built & id, Worker & worker) + : Goal{worker, init()} + , id{id} +{ + name = fmt("substitution of '%s'", id.to_string(worker.store)); + trace("created"); +} + +Goal::Co BuildTraceGoal::init() +{ + trace("init"); + + DrvOutput id2{ + .drvPath = StorePath::dummy, + .outputName = id.output, + }; + + // No `std::visit` with coroutines :( + if (const auto * path = std::get_if(&*id.drvPath)) { + // At least we know the drv path statically, can procede + id2.drvPath = path->path; + } else if (const auto * outputDeriving = std::get_if(&*id.drvPath)) { + // Dynamic derivation case, need to resolve that first. + + auto g = worker.makeBuildTraceGoal({ + outputDeriving->drvPath, + outputDeriving->output, + }); + + co_await await(Goals{upcast_goal(g)}); + + if (nrFailed > 0) { + debug("The output deriving path '%s' could not be resolved", outputDeriving->to_string(worker.store)); + co_return amDone(nrNoSubstituters > 0 ? ecNoSubstituters : ecFailed); + } + + id2.drvPath = g->outputInfo->outPath; + } + + /* If the derivation already exists, we’re done */ + if ((outputInfo = worker.store.queryRealisation(id2))) { + co_return amDone(ecSuccess); + } + + /** + * Firstly, whether we know the status, secondly, what it is + */ + std::optional drvIsResolved; + + /* If the derivation has statically-known output paths */ + if (worker.evalStore.isValidPath(id2.drvPath)) { + auto drv = worker.evalStore.readDerivation(id2.drvPath); + auto os = drv.outputsAndOptPaths(worker.store); + /* Mark what we now know */ + drvIsResolved = {drv.inputDrvs.map.empty()}; + if (auto * p = get(os, id2.outputName)) { + if (auto & outPath = p->second) { + outputInfo = std::make_shared(*outPath); + co_return amDone(ecSuccess); + } else { + /* Otherwise, not failure, just looking up build trace below. */ + } + } else { + debug( + "Derivation '%s' does not have output '%s', impossible to find build trace key-value pair", + worker.store.printStorePath(id2.drvPath), + id2.outputName); + co_return amDone(ecFailed); + } + } + + auto subs = settings.useSubstitutes ? getDefaultSubstituters() : std::list>(); + + bool substituterFailed = false; + + if (!drvIsResolved || *drvIsResolved) { + /* Since derivation might be resolved --- isn't known to be + not-resolved, it might have entries. So, let's try querying + the substituters. */ + for (const auto & sub : subs) { + trace("trying next substituter"); + + /* The callback of the curl download below can outlive `this` (if + some other error occurs), so it must not touch `this`. So put + the shared state in a separate refcounted object. */ + auto outPipe = std::make_shared(); +#ifndef _WIN32 + outPipe->create(); +#else + outPipe->createAsyncPipe(worker.ioport.get()); +#endif + + auto promise = std::make_shared>>(); + + sub->queryRealisation( + id2, {[outPipe(outPipe), promise(promise)](std::future> res) { + try { + Finally updateStats([&]() { outPipe->writeSide.close(); }); + promise->set_value(res.get()); + } catch (...) { + promise->set_exception(std::current_exception()); + } + }}); + + worker.childStarted( + shared_from_this(), + { +#ifndef _WIN32 + outPipe->readSide.get() +#else + &*outPipe +#endif + }, + true, + false); + + co_await Suspend{}; + + worker.childTerminated(this); + + std::shared_ptr outputInfo; + try { + outputInfo = promise->get_future().get(); + } catch (std::exception & e) { + printError(e.what()); + substituterFailed = true; + } + + if (!outputInfo) + continue; + + worker.store.registerDrvOutput({*outputInfo, id2}); + + trace("finished"); + co_return amDone(ecSuccess); + } + } + + /* Derivation might not be resolved, let's try doing that */ + trace("trying resolving derivation in build-trace goal"); + + auto g = worker.makeDerivationResolutionGoal(id2.drvPath); + + co_await await(Goals{g}); + + if (nrFailed > 0) { + /* None left. Terminate this goal and let someone else deal + with it. */ + debug( + "derivation output '%s' is required, but there is no substituter that can provide it", + id2.render(worker.store)); + + if (substituterFailed) { + worker.failedSubstitutions++; + worker.updateProgress(); + } + + /* Hack: don't indicate failure if there were no substituters. + In that case the calling derivation should just do a + build. */ + co_return amDone(substituterFailed ? ecFailed : ecNoSubstituters); + } + + /* This should be set if the goal succeeded */ + assert(g->resolvedDrv); + + /* Try everything again, now with a resolved derivation */ + auto bt2 = worker.makeBuildTraceGoal({ + makeConstantStorePathRef(g->resolvedDrvPath), + id2.outputName, + }); + + co_await await(Goals{bt2}); + + /* Set the build trace value as our own. Note the signure will not + match our key since we're the unresolved derivation, but that's + fine. We're not writing it to the DB; that's `bt2`' job. */ + if (bt2->outputInfo) + outputInfo = bt2->outputInfo; + + co_return amDone(bt2->exitCode, bt2->ex); +} + +std::string BuildTraceGoal::key() +{ + /* "a$" ensures substitution goals happen before derivation + goals. */ + return "a$" + std::string(id.to_string(worker.store)); +} + +void BuildTraceGoal::handleEOF(Descriptor fd) +{ + worker.wakeUp(shared_from_this()); +} + +} diff --git a/src/libstore/build/derivation-creation-and-realisation-goal.cc b/src/libstore/build/derivation-creation-and-realisation-goal.cc index 777eabfe7..b3f7fafcf 100644 --- a/src/libstore/build/derivation-creation-and-realisation-goal.cc +++ b/src/libstore/build/derivation-creation-and-realisation-goal.cc @@ -62,7 +62,7 @@ std::string DerivationCreationAndRealisationGoal::key() i.e. a derivation named "aardvark" always comes before "baboon". And substitution goals and inner derivation goals always happen before derivation goals (due to "b$"). */ - return "c$" + std::string(pathPartOfReq(*drvReq).name()) + "$" + DerivedPath::Built{ + return "d$" + std::string(pathPartOfReq(*drvReq).name()) + "$" + DerivedPath::Built{ .drvPath = drvReq, .outputs = wantedOutputs, }.to_string(worker.store); diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 1511c1ec1..6a9879dd0 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -50,7 +50,7 @@ std::string DerivationGoal::key() i.e. a derivation named "aardvark" always comes before "baboon". And substitution goals always happen before derivation goals (due to "b$"). */ - return "b$" + std::string(drvPath.name()) + "$" + SingleDerivedPath::Built{ + return "c$" + std::string(drvPath.name()) + "$" + SingleDerivedPath::Built{ .drvPath = makeConstantStorePathRef(drvPath), .output = wantedOutput, }.to_string(worker.store); diff --git a/src/libstore/build/derivation-resolution-goal.cc b/src/libstore/build/derivation-resolution-goal.cc new file mode 100644 index 000000000..f351a5406 --- /dev/null +++ b/src/libstore/build/derivation-resolution-goal.cc @@ -0,0 +1,82 @@ +#include "nix/store/build/derivation-resolution-goal.hh" +#include "nix/util/finally.hh" +#include "nix/store/build/worker.hh" +#include "nix/store/build/substitution-goal.hh" +#include "nix/util/callback.hh" +#include "nix/store/derivations.hh" + +namespace nix { + +DerivationResolutionGoal::DerivationResolutionGoal(const StorePath & drvPath, Worker & worker) + : Goal(worker, init()) + , drvPath(drvPath) +{ + name = fmt("resolution of '%s'", worker.store.printStorePath(drvPath)); + trace("created"); +} + +Goal::Co DerivationResolutionGoal::init() +{ + trace("init"); + + std::unique_ptr drv; + + if (worker.evalStore.isValidPath(drvPath)) { + drv = std::make_unique(worker.evalStore.readDerivation(drvPath)); + } else if (worker.store.isValidPath(drvPath)) { + drv = std::make_unique(worker.store.readDerivation(drvPath)); + } else { + auto goal0 = worker.makePathSubstitutionGoal(drvPath); + goal0->preserveException = true; + co_await await(Goals{goal0}); + if (nrFailed > 0) + co_return amDone(goal0->exitCode, goal0->ex); + + drv = std::make_unique(worker.store.readDerivation(drvPath)); + } + + trace("output path substituted"); + + std::set> goals; + + std::function, const DerivedPathMap::ChildNode &)> accumInputPaths; + + accumInputPaths = [&](ref depDrvPath, const DerivedPathMap::ChildNode & inputNode) { + for (auto & outputName : inputNode.value) + goals.insert(worker.makeBuildTraceGoal(SingleDerivedPath::Built{depDrvPath, outputName})); + + for (auto & [outputName, childNode] : inputNode.childMap) + accumInputPaths(make_ref(SingleDerivedPath::Built{depDrvPath, outputName}), childNode); + }; + + for (auto & [depDrvPath, depNode] : drv->inputDrvs.map) + accumInputPaths(makeConstantStorePathRef(depDrvPath), depNode); + + if (nrFailed > 0) { + debug("TODO message"); + co_return amDone(nrNoSubstituters > 0 ? ecNoSubstituters : ecFailed); + } + + if (true /*auto d = drv.tryResolve(....)*/) { + //resolvedDerivation = d.take(); + + trace("finished"); + co_return amDone(ecSuccess); + } else { + // fail + } +} + +std::string DerivationResolutionGoal::key() +{ + /* "a$" ensures substitution goals happen before derivation + goals. */ + return "b$" + worker.store.printStorePath(drvPath); +} + +void DerivationResolutionGoal::handleEOF(Descriptor fd) +{ + worker.wakeUp(shared_from_this()); +} + +} diff --git a/src/libstore/build/drv-output-substitution-goal.cc b/src/libstore/build/drv-output-substitution-goal.cc index e48ee3196..7c982b3ae 100644 --- a/src/libstore/build/drv-output-substitution-goal.cc +++ b/src/libstore/build/drv-output-substitution-goal.cc @@ -3,7 +3,7 @@ #include "nix/store/build/worker.hh" #include "nix/store/build/substitution-goal.hh" #include "nix/util/callback.hh" -#include "nix/store/store-open.hh" +#include "nix/store/build/build-trace-goal.hh" namespace nix { @@ -20,101 +20,32 @@ Goal::Co DrvOutputSubstitutionGoal::init() { trace("init"); - /* If the derivation already exists, we’re done */ - if (worker.store.queryRealisation(id)) { - co_return amDone(ecSuccess); + auto goal0 = worker.makeBuildTraceGoal({ + makeConstantStorePathRef(id.drvPath), + id.outputName, + }); + co_await await(Goals{upcast_goal(goal0)}); + + trace("output path substituted"); + + if (nrFailed > 0) { + debug("The output path of the derivation output '%s' could not be substituted", id.render(worker.store)); + co_return amDone(nrNoSubstituters > 0 ? ecNoSubstituters : ecFailed); } - auto subs = settings.useSubstitutes ? getDefaultSubstituters() : std::list>(); + auto goal1 = worker.makePathSubstitutionGoal(goal0->outputInfo->outPath); + goal0.reset(); - bool substituterFailed = false; - - for (const auto & sub : subs) { - trace("trying next substituter"); - - /* The callback of the curl download below can outlive `this` (if - some other error occurs), so it must not touch `this`. So put - the shared state in a separate refcounted object. */ - auto outPipe = std::make_shared(); -#ifndef _WIN32 - outPipe->create(); -#else - outPipe->createAsyncPipe(worker.ioport.get()); -#endif - - auto promise = std::make_shared>>(); - - sub->queryRealisation( - id, {[outPipe(outPipe), promise(promise)](std::future> res) { - try { - Finally updateStats([&]() { outPipe->writeSide.close(); }); - promise->set_value(res.get()); - } catch (...) { - promise->set_exception(std::current_exception()); - } - }}); - - worker.childStarted( - shared_from_this(), - { -#ifndef _WIN32 - outPipe->readSide.get() -#else - &*outPipe -#endif - }, - true, - false); - - co_await Suspend{}; - - worker.childTerminated(this); - - try { - outputInfo = promise->get_future().get(); - } catch (std::exception & e) { - printError(e.what()); - substituterFailed = true; - } - - if (!outputInfo) - continue; - - co_await await(Goals{worker.makePathSubstitutionGoal(outputInfo->outPath)}); - - trace("output path substituted"); - - if (nrFailed > 0) { - debug("The output path of the derivation output '%s' could not be substituted", id.render(worker.store)); - co_return amDone(nrNoSubstituters > 0 ? ecNoSubstituters : ecFailed); - } - - worker.store.registerDrvOutput({*outputInfo, id}); - - trace("finished"); - co_return amDone(ecSuccess); - } - - /* None left. Terminate this goal and let someone else deal - with it. */ - debug("derivation output '%s' is required, but there is no substituter that can provide it", id.render(worker.store)); - - if (substituterFailed) { - worker.failedSubstitutions++; - worker.updateProgress(); - } - - /* Hack: don't indicate failure if there were no substituters. - In that case the calling derivation should just do a - build. */ - co_return amDone(substituterFailed ? ecFailed : ecNoSubstituters); + goal1->preserveException = true; + co_await await(Goals{upcast_goal(goal1)}); + co_return amDone(goal1->exitCode, goal1->ex); } std::string DrvOutputSubstitutionGoal::key() { /* "a$" ensures substitution goals happen before derivation goals. */ - return "a$" + std::string(id.render(worker.store)); + return "b$" + std::string(id.render(worker.store)); } void DrvOutputSubstitutionGoal::handleEOF(Descriptor fd) diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index 7dd14a688..285d2ba83 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -9,6 +9,8 @@ #ifndef _WIN32 // TODO Enable building on Windows # include "nix/store/build/hook-instance.hh" #endif +#include "nix/store/build/build-trace-goal.hh" +#include "nix/store/build/derivation-resolution-goal.hh" #include "nix/util/signals.hh" namespace nix { @@ -103,6 +105,33 @@ std::shared_ptr Worker::makeDrvOutputSubstitutionGoal } +std::shared_ptr Worker::makeBuildTraceGoal( + const SingleDerivedPath::Built & req) +{ + std::weak_ptr & goal_weak = buildTraceGoals.ensureSlot(req).value; + std::shared_ptr goal = goal_weak.lock(); + if (!goal) { + goal = std::make_shared(req, *this); + goal_weak = goal; + wakeUp(goal); + } + return goal; +} + + +std::shared_ptr Worker::makeDerivationResolutionGoal(const StorePath & drvPath) +{ + std::weak_ptr & goal_weak = derivationResolutionGoals[drvPath]; + auto goal = goal_weak.lock(); // FIXME + if (!goal) { + goal = std::make_shared(drvPath, *this); + goal_weak = goal; + wakeUp(goal); + } + return goal; +} + + GoalPtr Worker::makeGoal(const DerivedPath & req, BuildMode buildMode) { return std::visit(overloaded { @@ -576,4 +605,14 @@ GoalPtr upcast_goal(std::shared_ptr subGoal) return subGoal; } +GoalPtr upcast_goal(std::shared_ptr subGoal) +{ + return subGoal; +} + +GoalPtr upcast_goal(std::shared_ptr subGoal) +{ + return subGoal; +} + } diff --git a/src/libstore/ca-specific-schema.sql b/src/libstore/ca-specific-schema.sql index d563b33d8..b0095fb33 100644 --- a/src/libstore/ca-specific-schema.sql +++ b/src/libstore/ca-specific-schema.sql @@ -8,7 +8,11 @@ create table if not exists Realisations ( outputName text not null, -- symbolic output id, usually "out" outputPath integer not null, signatures text, -- space-separated list - foreign key (outputPath) references ValidPaths(id) on delete cascade + + -- No such foreign key because we may well want realisations for + -- garbage-collected dependencies + + --foreign key (outputPath) references ValidPaths(id) on delete cascade ); create index if not exists IndexRealisations on Realisations(drvPath, outputName); diff --git a/src/libstore/derived-path-map.cc b/src/libstore/derived-path-map.cc index c5856701a..307cf40f5 100644 --- a/src/libstore/derived-path-map.cc +++ b/src/libstore/derived-path-map.cc @@ -52,7 +52,9 @@ typename DerivedPathMap::ChildNode * DerivedPathMap::findSlot(const Single // instantiations +#include "nix/store/build/build-trace-goal.hh" #include "nix/store/build/derivation-creation-and-realisation-goal.hh" + namespace nix { template<> @@ -69,7 +71,7 @@ std::strong_ordering DerivedPathMap::ChildNode::operator <=> ( template struct DerivedPathMap::ChildNode; template struct DerivedPathMap; +template struct DerivedPathMap>; template struct DerivedPathMap>>; - }; diff --git a/src/libstore/include/nix/store/build/build-trace-goal.hh b/src/libstore/include/nix/store/build/build-trace-goal.hh new file mode 100644 index 000000000..07268177a --- /dev/null +++ b/src/libstore/include/nix/store/build/build-trace-goal.hh @@ -0,0 +1,54 @@ +#pragma once +///@file + +#include +#include + +#include "nix/store/store-api.hh" +#include "nix/store/build/goal.hh" +#include "nix/store/realisation.hh" +#include "nix/util/muxable-pipe.hh" + +namespace nix { + +class Worker; + +/** + * Try to recursively obtain build trace key-value pairs in order to + * resolve the given output deriving path. + */ +class BuildTraceGoal : public Goal +{ + + /** + * The output derivation path we're trying to reasolve. + */ + SingleDerivedPath::Built id; + +public: + BuildTraceGoal(const SingleDerivedPath::Built & id, Worker & worker); + + /** + * The realisation corresponding to the given output id. + * Will be filled once we can get it. + */ + std::shared_ptr outputInfo; + + Co init(); + + void timedOut(Error && ex) override + { + unreachable(); + }; + + std::string key() override; + + void handleEOF(Descriptor fd) override; + + JobCategory jobCategory() const override + { + return JobCategory::Substitution; + }; +}; + +} diff --git a/src/libstore/include/nix/store/build/derivation-resolution-goal.hh b/src/libstore/include/nix/store/build/derivation-resolution-goal.hh new file mode 100644 index 000000000..7b739200e --- /dev/null +++ b/src/libstore/include/nix/store/build/derivation-resolution-goal.hh @@ -0,0 +1,60 @@ +#pragma once +///@file + +#include +#include + +#include "nix/store/store-api.hh" +#include "nix/store/build/goal.hh" +#include "nix/store/realisation.hh" +#include "nix/util/muxable-pipe.hh" + +namespace nix { + +class Worker; + +/** + * The purpose of this is to resolve the given derivation, so that it + * only has constant deriving paths as inputs. + */ +class DerivationResolutionGoal : public Goal +{ + + /** + * The derivation we're trying to substitute + */ + StorePath drvPath; + +public: + DerivationResolutionGoal(const StorePath & storePath, Worker & worker); + + /** + * The resolved derivation, if we succeeded. + */ + std::shared_ptr resolvedDrv; + + /** + * The path to derivation above, if we succeeded. + * + * Garbage that should not be read otherwise. + */ + StorePath resolvedDrvPath = StorePath::dummy; + + Co init(); + + void timedOut(Error && ex) override + { + unreachable(); + }; + + std::string key() override; + + void handleEOF(Descriptor fd) override; + + JobCategory jobCategory() const override + { + return JobCategory::Substitution; + }; +}; + +} diff --git a/src/libstore/include/nix/store/build/drv-output-substitution-goal.hh b/src/libstore/include/nix/store/build/drv-output-substitution-goal.hh index b8c875b7b..9a01c4ace 100644 --- a/src/libstore/include/nix/store/build/drv-output-substitution-goal.hh +++ b/src/libstore/include/nix/store/build/drv-output-substitution-goal.hh @@ -35,12 +35,6 @@ public: RepairFlag repair = NoRepair, std::optional ca = std::nullopt); - /** - * The realisation corresponding to the given output id. - * Will be filled once we can get it. - */ - std::shared_ptr outputInfo; - Co init(); void timedOut(Error && ex) override diff --git a/src/libstore/include/nix/store/build/worker.hh b/src/libstore/include/nix/store/build/worker.hh index 5f83ab76b..58a743f7c 100644 --- a/src/libstore/include/nix/store/build/worker.hh +++ b/src/libstore/include/nix/store/build/worker.hh @@ -19,6 +19,8 @@ struct DerivationGoal; struct DerivationBuildingGoal; struct PathSubstitutionGoal; class DrvOutputSubstitutionGoal; +class BuildTraceGoal; +class DerivationResolutionGoal; /** * Workaround for not being able to declare a something like @@ -35,6 +37,8 @@ class DrvOutputSubstitutionGoal; GoalPtr upcast_goal(std::shared_ptr subGoal); GoalPtr upcast_goal(std::shared_ptr subGoal); GoalPtr upcast_goal(std::shared_ptr subGoal); +GoalPtr upcast_goal(std::shared_ptr subGoal); +GoalPtr upcast_goal(std::shared_ptr subGoal); typedef std::chrono::time_point steady_time_point; @@ -108,12 +112,14 @@ private: * same derivation / path. */ + DerivedPathMap> buildTraceGoals; DerivedPathMap>> derivationCreationAndRealisationGoals; std::map>> derivationGoals; std::map> derivationBuildingGoals; std::map> substitutionGoals; std::map> drvOutputSubstitutionGoals; + std::map> derivationResolutionGoals; /** * Goals waiting for busy paths to be unlocked. @@ -230,11 +236,26 @@ public: BuildMode buildMode = bmNormal); /** - * @ref PathSubstitutionGoal "substitution goal" + * @ref PathSubstitutionGoal "path substitution goal" */ std::shared_ptr makePathSubstitutionGoal(const StorePath & storePath, RepairFlag repair = NoRepair, std::optional ca = std::nullopt); + + /** + * @ref DrvOutputSubstitutionGoal "derivation output substitution goal" + */ std::shared_ptr makeDrvOutputSubstitutionGoal(const DrvOutput & id, RepairFlag repair = NoRepair, std::optional ca = std::nullopt); + /** + * @ref BuildTraceGoal "derivation output substitution goal" + */ + std::shared_ptr makeBuildTraceGoal( + const SingleDerivedPath::Built & key); + + /** + * @ref DerivationResolutionGoal "derivation resolution goal" + */ + std::shared_ptr makeDerivationResolutionGoal(const StorePath & drvPath); + /** * Make a goal corresponding to the `DerivedPath`. * diff --git a/src/libstore/include/nix/store/meson.build b/src/libstore/include/nix/store/meson.build index f17847f77..2edceb97a 100644 --- a/src/libstore/include/nix/store/meson.build +++ b/src/libstore/include/nix/store/meson.build @@ -12,10 +12,12 @@ config_pub_h = configure_file( headers = [config_pub_h] + files( 'binary-cache-store.hh', 'build-result.hh', + 'build/build-trace-goal.hh', 'build/derivation-goal.hh', 'build/derivation-building-goal.hh', 'build/derivation-building-misc.hh', 'build/derivation-creation-and-realisation-goal.hh', + 'build/derivation-resolution-goal.hh', 'build/drv-output-substitution-goal.hh', 'build/goal.hh', 'build/substitution-goal.hh', diff --git a/src/libstore/meson.build b/src/libstore/meson.build index a4762715a..a3070177f 100644 --- a/src/libstore/meson.build +++ b/src/libstore/meson.build @@ -253,9 +253,12 @@ subdir('nix-meson-build-support/common') sources = files( 'binary-cache-store.cc', 'build-result.cc', + 'build/build-trace-goal.cc', 'build/derivation-goal.cc', 'build/derivation-building-goal.cc', 'build/derivation-creation-and-realisation-goal.cc', + 'build/derivation-goal.cc', + 'build/derivation-resolution-goal.cc', 'build/drv-output-substitution-goal.cc', 'build/entry-points.cc', 'build/goal.cc',