Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
installables.hh
Go to the documentation of this file.
1#pragma once
3
4#include "path.hh"
5#include "outputs-spec.hh"
6#include "derived-path.hh"
7#include "built-path.hh"
8#include "store-api.hh"
9#include "build-result.hh"
10
11#include <optional>
12
13namespace nix {
14
15struct PackageInfo;
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
89BuiltPaths toBuiltPaths(const std::vector<BuiltPathWithResult> & builtPathsWithResult);
90
95typedef std::vector<DerivedPathWithInfo> DerivedPathsWithInfo;
96
97struct Installable;
98
103typedef std::vector<ref<Installable>> Installables;
104
114{
115 virtual ~Installable() { }
116
124 virtual std::string what() const = 0;
125
133
143
151 virtual std::optional<StorePath> getStorePath()
152 {
153 return {};
154 }
155
156 static std::vector<BuiltPathWithResult> build(
157 ref<Store> evalStore,
159 Realise mode,
160 const Installables & installables,
161 BuildMode bMode = bmNormal);
162
163 static std::vector<std::pair<ref<Installable>, BuiltPathWithResult>> build2(
164 ref<Store> evalStore,
166 Realise mode,
167 const Installables & installables,
168 BuildMode bMode = bmNormal);
169
170 static std::set<StorePath> toStorePathSet(
171 ref<Store> evalStore,
173 Realise mode,
174 OperateOn operateOn,
175 const Installables & installables);
176
177 static std::vector<StorePath> toStorePaths(
178 ref<Store> evalStore,
180 Realise mode,
181 OperateOn operateOn,
182 const Installables & installables);
183
184 static StorePath toStorePath(
185 ref<Store> evalStore,
187 Realise mode,
188 OperateOn operateOn,
189 ref<Installable> installable);
190
191 static std::set<StorePath> toDerivations(
193 const Installables & installables,
194 bool useDeriver = false);
195
196 static BuiltPaths toBuiltPaths(
197 ref<Store> evalStore,
199 Realise mode,
200 OperateOn operateOn,
201 const Installables & installables);
202};
203
204}
Definition path.hh:27
Definition ref.hh:15
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:103
std::vector< DerivedPathWithInfo > DerivedPathsWithInfo
Definition installables.hh:95
ChunkedVector< std::string, 8192 > store
Definition lexer.l:1011
Definition installables.hh:83
Definition built-path.hh:84
Definition derivations.hh:342
Definition installables.hh:72
Definition derived-path.hh:229
Definition installables.hh:63
Definition installables.hh:114
virtual std::string what() const =0
DerivedPathWithInfo toDerivedPath()
Definition installables.cc:428
virtual DerivedPathsWithInfo toDerivedPaths()=0
virtual std::optional< StorePath > getStorePath()
Definition installables.hh:151
Definition get-drvs.hh:17