Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
derivation-trampoline-goal.hh
Go to the documentation of this file.
1#pragma once
3
8
9namespace nix {
10
85struct DerivationTrampolineGoal : public Goal
86{
91
96
97 DerivationTrampolineGoal(
100 Worker & worker,
101 BuildMode buildMode = bmNormal);
102
103 DerivationTrampolineGoal(
104 const StorePath & drvPath,
106 const Derivation & drv,
107 Worker & worker,
108 BuildMode buildMode = bmNormal);
109
110 virtual ~DerivationTrampolineGoal();
111
112 std::string key() override;
113
114 JobCategory jobCategory() const override
115 {
117 };
118
119private:
120
121 using LoadedDerivation = std::pair<StorePath, Derivation>;
122 using LoadResult = std::variant<LoadedDerivation, BuildResult::Failure>;
123 using Result = std::pair<ExitCode, BuildResult>;
124
125 Co<ExitCode> init(Co<Result> work);
126 Co<LoadResult> loadDerivation();
127 Co<Result> haveToLoadFromStore();
128 Co<Result> haveDerivation(StorePath drvPath, Derivation drv);
129
130 BuildMode buildMode;
131
135 void commonInit();
136};
137
138} // namespace nix
Definition path.hh:33
Definition worker.hh:110
Definition ref.hh:58
JobCategory
Definition goal.hh:57
@ Administration
Definition goal.hh:75
outcome::unchecked< T, E > Result
Definition result.hh:24
JobCategory jobCategory() const override
Hint for the scheduler, which concurrency limit applies.
Definition derivation-trampoline-goal.hh:114
OutputsSpec wantedOutputs
Definition derivation-trampoline-goal.hh:95
std::string key() override
Definition derivation-trampoline-goal.cc:52
ref< const SingleDerivedPath > drvReq
Definition derivation-trampoline-goal.hh:90
void work()
Definition goal.cc:128
Worker & worker
Definition goal.hh:140
Definition outputs-spec.hh:27