Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
drv-output-substitution-goal.hh
Go to the documentation of this file.
1#pragma once
3
8#include <future>
9
10namespace nix {
11
12class Worker;
13
21class DrvOutputSubstitutionGoal : public Goal {
22
26 DrvOutput id;
27
32 std::shared_ptr<const Realisation> outputInfo;
33
37 std::list<ref<Store>> subs;
38
42 std::shared_ptr<Store> sub;
43
44 NotifyingCounter<uint64_t>::Bump maintainRunningSubstitutions;
45
46 struct DownloadState
47 {
48 kj::Own<kj::CrossThreadPromiseFulfiller<void>> outPipe;
49 std::future<std::shared_ptr<const Realisation>> result;
50 };
51
52 std::shared_ptr<DownloadState> downloadState;
53
57 bool substituterFailed = false;
58
59public:
60 DrvOutputSubstitutionGoal(
61 const DrvOutput & id,
62 Worker & worker,
63 bool isDependency,
64 RepairFlag repair = NoRepair,
65 std::optional<ContentAddress> ca = std::nullopt
66 );
67
68 kj::Promise<Result<WorkResult>> tryNext() noexcept;
69 kj::Promise<Result<WorkResult>> realisationFetched() noexcept;
70 kj::Promise<Result<WorkResult>> outPathValid() noexcept;
71 kj::Promise<Result<WorkResult>> finished() noexcept;
72
73 kj::Promise<Result<WorkResult>> workImpl() noexcept override;
74
75 JobCategory jobCategory() const override {
77 };
78};
79
80}
JobCategory jobCategory() const override
Hint for the scheduler, which concurrency limit applies.
Definition drv-output-substitution-goal.hh:75
Definition notifying-counter.hh:19
Definition worker.hh:89
JobCategory
Definition goal.hh:36
@ Substitution
Definition goal.hh:44
Definition realisation.hh:24
const bool isDependency
Definition goal.hh:61
Worker & worker
Definition goal.hh:54