Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
installables.hh
Go to the documentation of this file.
1#pragma once
3
4#include "lix/libexpr/eval.hh"
10
11#include <optional>
12
13namespace nix {
14
15struct DrvInfo;
16
40
54
63{
64 virtual ~ExtraPathInfo() = default;
65};
66
72{
73 DerivedPath path;
75};
76
83{
84 BuiltPath path;
86 std::optional<BuildResult> result;
87};
88
93typedef std::vector<DerivedPathWithInfo> DerivedPathsWithInfo;
94
95struct Installable;
96
101typedef std::vector<ref<Installable>> Installables;
102
112{
113 virtual ~Installable() { }
114
122 virtual std::string what() const = 0;
123
131
141
149 virtual std::optional<StorePath> getStorePath()
150 {
151 return {};
152 }
153
154 static std::vector<BuiltPathWithResult> build(
155 EvalState & state,
156 ref<Store> evalStore,
157 ref<Store> store,
158 Realise mode,
159 const Installables & installables,
160 BuildMode bMode = bmNormal);
161
162 static std::vector<std::pair<ref<Installable>, BuiltPathWithResult>> build2(
163 EvalState & state,
164 ref<Store> evalStore,
165 ref<Store> store,
166 Realise mode,
167 const Installables & installables,
168 BuildMode bMode = bmNormal);
169
170 static std::set<StorePath> toStorePathSet(
171 EvalState & state,
172 ref<Store> evalStore,
173 ref<Store> store,
174 Realise mode,
175 OperateOn operateOn,
176 const Installables & installables);
177
178 static std::vector<StorePath> toStorePaths(
179 EvalState & state,
180 ref<Store> evalStore,
181 ref<Store> store,
182 Realise mode,
183 OperateOn operateOn,
184 const Installables & installables);
185
186 static StorePath toStorePath(
187 EvalState & state,
188 ref<Store> evalStore,
189 ref<Store> store,
190 Realise mode,
191 OperateOn operateOn,
192 ref<Installable> installable);
193
194 static std::set<StorePath> toDerivations(
195 EvalState & state,
196 ref<Store> store,
197 const Installables & installables,
198 bool useDeriver = false);
199
200 static BuiltPaths toBuiltPaths(
201 EvalState & state,
202 ref<Store> evalStore,
203 ref<Store> store,
204 Realise mode,
205 OperateOn operateOn,
206 const Installables & installables);
207};
208
209}
Definition eval.hh:685
Definition path.hh:21
Definition ref.hh:19
OperateOn
Definition installables.hh:44
@ Output
Definition installables.hh:48
Realise
Definition installables.hh:17
@ Outputs
Definition installables.hh:23
@ Nothing
Definition installables.hh:38
std::vector< ref< Installable > > Installables
Definition installables.hh:101
std::vector< DerivedPathWithInfo > DerivedPathsWithInfo
Definition installables.hh:93
Definition installables.hh:83
Definition built-path.hh:83
Definition derivations.hh:324
Definition installables.hh:72
Definition derived-path.hh:225
Definition get-drvs.hh:16
Definition installables.hh:63
Definition installables.hh:112
virtual std::string what() const =0
DerivedPathWithInfo toDerivedPath(EvalState &state)
Definition installables.cc:379
virtual DerivedPathsWithInfo toDerivedPaths(EvalState &state)=0
virtual std::optional< StorePath > getStorePath()
Definition installables.hh:149