Nix
2.93.0-dev
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
context.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
lix/libutil/comparator.hh
"
5
#include "
lix/libstore/derived-path.hh
"
6
#include "
lix/libutil/variant-wrapper.hh
"
7
8
namespace
nix {
9
10
class
BadNixStringContextElem
:
public
Error
11
{
12
public
:
13
std::string_view raw;
14
15
template
<
typename
...
Args
>
16
BadNixStringContextElem
(std::string_view raw_,
const
Args
& ... args)
17
: Error(
""
)
18
{
19
raw = raw_;
20
auto
hf =
HintFmt
(args...);
21
err.msg =
HintFmt
(
"Bad String Context element: %1%: %2%"
,
Uncolored
(hf.str()), raw);
22
}
23
};
24
25
struct
NixStringContextElem
{
31
using
Opaque
=
SingleDerivedPath::Opaque
;
32
42
struct
DrvDeep
{
43
StorePath
drvPath;
44
45
GENERATE_CMP
(
DrvDeep
, me->drvPath);
46
};
47
53
using
Built
=
SingleDerivedPath::Built
;
54
55
using
Raw = std::variant<
56
Opaque
,
57
DrvDeep
,
58
Built
59
>;
60
61
Raw raw;
62
63
GENERATE_CMP
(
NixStringContextElem
, me->raw);
64
65
MAKE_WRAPPER_CONSTRUCTOR
(
NixStringContextElem
);
66
75
static
NixStringContextElem
parse
(
76
std::string_view s,
77
const
ExperimentalFeatureSettings
& xpSettings = experimentalFeatureSettings);
78
std::string to_string()
const
;
79
};
80
81
typedef
std::set<NixStringContextElem> NixStringContext;
82
83
}
nix::Args
Definition
args.hh:31
nix::BadNixStringContextElem
Definition
context.hh:11
nix::HintFmt
Definition
fmt.hh:157
nix::StorePath
Definition
path.hh:21
comparator.hh
GENERATE_CMP
#define GENERATE_CMP(args...)
Definition
comparator.hh:65
derived-path.hh
nix::DerivedPathOpaque
Definition
derived-path.hh:26
nix::FeatureSettings
Definition
config.hh:382
nix::NixStringContextElem::DrvDeep
Definition
context.hh:42
nix::NixStringContextElem
Definition
context.hh:25
nix::NixStringContextElem::parse
static NixStringContextElem parse(std::string_view s, const ExperimentalFeatureSettings &xpSettings=experimentalFeatureSettings)
Definition
context.cc:7
nix::NixStringContextElem::Opaque
SingleDerivedPath::Opaque Opaque
Definition
context.hh:31
nix::SingleDerivedPathBuilt
Definition
derived-path.hh:45
nix::Uncolored
Definition
fmt.hh:44
variant-wrapper.hh
MAKE_WRAPPER_CONSTRUCTOR
#define MAKE_WRAPPER_CONSTRUCTOR(CLASS_NAME)
Definition
variant-wrapper.hh:27
lix
libexpr
value
context.hh
Generated by
1.10.0