Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
installables.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
nix/store/path.hh
"
5
#include "
nix/store/outputs-spec.hh
"
6
#include "
nix/store/derived-path.hh
"
7
#include "
nix/cmd/built-path.hh
"
8
#include "
nix/store/store-api.hh
"
9
#include "
nix/store/build-result.hh
"
10
11
#include <optional>
12
13
namespace
nix {
14
15
struct
PackageInfo
;
16
17
enum class
Realise
{
23
Outputs,
29
Derivation,
38
Nothing
39
};
40
44
enum class
OperateOn
{
48
Output
,
52
Derivation
53
};
54
62
struct
ExtraPathInfo
63
{
64
virtual
~ExtraPathInfo
() =
default
;
65
};
66
71
struct
DerivedPathWithInfo
72
{
73
DerivedPath
path;
74
ref<ExtraPathInfo>
info;
75
};
76
82
struct
BuiltPathWithResult
83
{
84
BuiltPath
path;
85
ref<ExtraPathInfo>
info;
86
std::optional<BuildResult> result;
87
};
88
89
BuiltPaths toBuiltPaths(
const
std::vector<BuiltPathWithResult> & builtPathsWithResult);
90
95
typedef
std::vector<DerivedPathWithInfo>
DerivedPathsWithInfo
;
96
97
struct
Installable
;
98
103
typedef
std::vector<ref<Installable>>
Installables
;
104
113
struct
Installable
114
{
115
virtual
~Installable
() {}
116
124
virtual
std::string
what
()
const
= 0;
125
132
virtual
DerivedPathsWithInfo
toDerivedPaths
() = 0;
133
142
DerivedPathWithInfo
toDerivedPath
();
143
151
virtual
std::optional<StorePath>
getStorePath
()
152
{
153
return
{};
154
}
155
156
static
std::vector<BuiltPathWithResult> build(
157
ref<Store>
evalStore,
158
ref<Store>
store,
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,
165
ref<Store>
store,
166
Realise
mode,
167
const
Installables
& installables,
168
BuildMode bMode = bmNormal);
169
170
static
std::set<StorePath> toStorePathSet(
171
ref<Store>
evalStore,
ref<Store>
store,
Realise
mode,
OperateOn
operateOn,
const
Installables
& installables);
172
173
static
std::vector<StorePath> toStorePaths(
174
ref<Store>
evalStore,
ref<Store>
store,
Realise
mode,
OperateOn
operateOn,
const
Installables
& installables);
175
176
static
StorePath
toStorePath(
177
ref<Store>
evalStore,
ref<Store>
store,
Realise
mode,
OperateOn
operateOn,
ref<Installable>
installable);
178
179
static
std::set<StorePath>
180
toDerivations(
ref<Store>
store,
const
Installables
& installables,
bool
useDeriver =
false
);
181
182
static
BuiltPaths toBuiltPaths(
183
ref<Store>
evalStore,
ref<Store>
store,
Realise
mode,
OperateOn
operateOn,
const
Installables
& installables);
184
};
185
186
}
// namespace nix
build-result.hh
built-path.hh
nix::StorePath
Definition
path.hh:33
nix::ref
Definition
ref.hh:58
nix::OperateOn
OperateOn
Definition
installables.hh:44
nix::OperateOn::Output
@ Output
Definition
installables.hh:48
nix::Realise
Realise
Definition
installables.hh:17
nix::Realise::Nothing
@ Nothing
Definition
installables.hh:38
nix::Installables
std::vector< ref< Installable > > Installables
Definition
installables.hh:103
nix::DerivedPathsWithInfo
std::vector< DerivedPathWithInfo > DerivedPathsWithInfo
Definition
installables.hh:95
derived-path.hh
outputs-spec.hh
path.hh
store-api.hh
nix::BuiltPathWithResult
Definition
installables.hh:83
nix::BuiltPath
Definition
built-path.hh:83
nix::DerivedPathWithInfo
Definition
installables.hh:72
nix::DerivedPath
Definition
derived-path.hh:238
nix::ExtraPathInfo
Definition
installables.hh:63
nix::Installable
Definition
installables.hh:114
nix::Installable::what
virtual std::string what() const =0
nix::Installable::toDerivedPath
DerivedPathWithInfo toDerivedPath()
Definition
installables.cc:412
nix::Installable::toDerivedPaths
virtual DerivedPathsWithInfo toDerivedPaths()=0
nix::Installable::getStorePath
virtual std::optional< StorePath > getStorePath()
Definition
installables.hh:151
nix::PackageInfo
Definition
get-drvs.hh:16
libcmd
include
nix
cmd
installables.hh
Generated by
1.18.0