Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
common-eval-args.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
nix/util/args.hh
"
5
#include "
nix/util/canon-path.hh
"
6
#include "
nix/main/common-args.hh
"
7
#include "
nix/expr/search-path.hh
"
8
#include "
nix/expr/eval-settings.hh
"
9
#include "
nix/store/store-reference.hh
"
10
11
#include <filesystem>
12
13
namespace
nix {
14
15
class
Store
;
16
17
namespace
fetchers {
18
struct
Settings
;
19
}
20
21
class
EvalState
;
22
struct
CompatibilitySettings
;
23
class
Bindings
;
24
25
namespace
flake {
26
struct
Settings
;
27
}
28
32
extern
fetchers::Settings
fetchSettings;
33
37
extern
EvalSettings
evalSettings;
38
42
extern
flake::Settings
flakeSettings;
43
47
extern
CompatibilitySettings
compatibilitySettings;
48
49
struct
MixEvalArgs :
virtual
Args
,
virtual
MixRepair
50
{
51
static
constexpr
auto
category =
"Common evaluation options"
;
52
53
MixEvalArgs();
54
55
const
Bindings
* getAutoArgs(
EvalState
& state);
56
57
LookupPath
lookupPath;
58
59
std::optional<StoreReference> evalStoreUrl;
60
61
private
:
62
struct
AutoArgExpr
63
{
64
std::string expr;
65
};
66
67
struct
AutoArgString
68
{
69
std::string s;
70
};
71
72
struct
AutoArgFile
73
{
74
std::filesystem::path path;
75
};
76
77
struct
AutoArgStdin
78
{};
79
80
using
AutoArg = std::variant<AutoArgExpr, AutoArgString, AutoArgFile, AutoArgStdin>;
81
82
std::map<std::string, AutoArg> autoArgs;
83
};
84
88
SourcePath
lookupFileArg(
EvalState
& state, std::string_view s,
const
std::filesystem::path * baseDir =
nullptr
);
89
90
}
// namespace nix
args.hh
canon-path.hh
nix::Args
Definition
args.hh:29
nix::Bindings
Definition
attr-set.hh:67
nix::EvalState
Definition
eval.hh:420
nix::Store
Definition
store-api.hh:397
common-args.hh
eval-settings.hh
search-path.hh
store-reference.hh
nix::CompatibilitySettings
Definition
compatibility-settings.hh:6
nix::EvalSettings
Definition
eval-settings.hh:50
nix::LookupPath
Definition
search-path.hh:16
nix::SourcePath
Definition
source-path.hh:22
nix::fetchers::Settings
Definition
fetch-settings.hh:27
nix::flake::Settings
Definition
settings.hh:18
libcmd
include
nix
cmd
common-eval-args.hh
Generated by
1.18.0