Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
output.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
nix/store/path.hh
"
5
#include "
nix/store/content-address.hh
"
6
#include "
nix/store/outputs-spec.hh
"
7
#include "
nix/util/json-impls.hh
"
8
#include "
nix/util/variant-wrapper.hh
"
9
10
#include <variant>
11
12
namespace
nix {
13
14
struct
StoreDirConfig
;
15
16
namespace
derivation
{
17
21
struct
Output
22
{
26
struct
InputAddressed
27
{
28
StorePath
path;
29
30
bool
operator==(
const
InputAddressed
&)
const
=
default
;
31
auto
operator<=>(
const
InputAddressed
&)
const
=
default
;
32
};
33
38
struct
CAFixed
39
{
45
ContentAddress
ca
;
46
53
StorePath
path
(
const
StoreDirConfig
& store, std::string_view drvName,
OutputNameView
outputName)
const
;
54
55
bool
operator==(
const
CAFixed
&)
const
=
default
;
56
auto
operator<=>(
const
CAFixed
&)
const
=
default
;
57
};
58
64
struct
CAFloating
65
{
69
ContentAddressMethod
method
;
70
74
HashAlgorithm
hashAlgo
;
75
76
bool
operator==(
const
CAFloating
&)
const
=
default
;
77
auto
operator<=>(
const
CAFloating
&)
const
=
default
;
78
};
79
84
struct
Deferred
85
{
86
bool
operator==(
const
Deferred
&)
const
=
default
;
87
auto
operator<=>(
const
Deferred
&)
const
=
default
;
88
};
89
94
struct
Impure
95
{
99
ContentAddressMethod
method
;
100
104
HashAlgorithm
hashAlgo
;
105
106
bool
operator==(
const
Impure
&)
const
=
default
;
107
auto
operator<=>(
const
Impure
&)
const
=
default
;
108
};
109
110
typedef
std::variant<InputAddressed, CAFixed, CAFloating, Deferred, Impure> Raw;
111
112
Raw raw;
113
114
bool
operator==(
const
Output
&)
const
=
default
;
115
auto
operator<=>(
const
Output
&)
const
=
default
;
116
117
MAKE_WRAPPER_CONSTRUCTOR(
Output
);
118
122
Output
() =
delete
;
123
130
std::optional<StorePath>
131
path
(
const
StoreDirConfig
& store, std::string_view drvName,
OutputNameView
outputName)
const
;
132
};
133
134
template
<
typename
Out = Output>
135
using
Outputs = std::map<std::string, Out>;
136
143
typedef
std::map<std::string, std::pair<Output, std::optional<StorePath>>>
OutputsAndOptPaths
;
144
145
}
// namespace derivation
146
147
using
DerivationOutput =
derivation::Output
;
148
149
}
// namespace nix
150
151
JSON_IMPL_WITH_XP_FEATURES(nix::DerivationOutput)
nix::StorePath
Definition
path.hh:33
content-address.hh
json-impls.hh
outputs-spec.hh
nix::OutputNameView
std::string_view OutputNameView
Definition
outputs-spec.hh:24
path.hh
nix::derivation
Definition
derivation-options.cc:339
nix::derivation::OutputsAndOptPaths
std::map< std::string, std::pair< Output, std::optional< StorePath > > > OutputsAndOptPaths
Definition
output.hh:143
nix::ContentAddressMethod
Definition
content-address.hh:32
nix::ContentAddress
Definition
content-address.hh:162
nix::StoreDirConfig
Definition
store-dir-config.hh:29
nix::derivation::Output::CAFixed
Definition
output.hh:39
nix::derivation::Output::CAFixed::ca
ContentAddress ca
Definition
output.hh:45
nix::derivation::Output::CAFixed::path
StorePath path(const StoreDirConfig &store, std::string_view drvName, OutputNameView outputName) const
Definition
output.cc:26
nix::derivation::Output::CAFloating
Definition
output.hh:65
nix::derivation::Output::CAFloating::hashAlgo
HashAlgorithm hashAlgo
Definition
output.hh:74
nix::derivation::Output::CAFloating::method
ContentAddressMethod method
Definition
output.hh:69
nix::derivation::Output::Deferred
Definition
output.hh:85
nix::derivation::Output::Impure
Definition
output.hh:95
nix::derivation::Output::Impure::hashAlgo
HashAlgorithm hashAlgo
Definition
output.hh:104
nix::derivation::Output::Impure::method
ContentAddressMethod method
Definition
output.hh:99
nix::derivation::Output::InputAddressed
Definition
output.hh:27
nix::derivation::Output
Definition
output.hh:22
nix::derivation::Output::Output
Output()=delete
nix::derivation::Output::path
std::optional< StorePath > path(const StoreDirConfig &store, std::string_view drvName, OutputNameView outputName) const
Definition
output.cc:11
variant-wrapper.hh
libstore
include
nix
store
derivation
output.hh
Generated by
1.18.0