mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
No global eval settings in libnixexpr
Progress on #5638 There is still a global eval settings, but it pushed down into `libnixcmd`, which is a lot less bad a place for this sort of thing.
This commit is contained in:
parent
cb0c868da4
commit
52bfccf8d8
24 changed files with 102 additions and 71 deletions
|
@ -7,9 +7,11 @@ namespace nix {
|
|||
|
||||
struct EvalSettings : Config
|
||||
{
|
||||
EvalSettings();
|
||||
EvalSettings(bool & readOnlyMode);
|
||||
|
||||
static Strings getDefaultNixPath();
|
||||
bool & readOnlyMode;
|
||||
|
||||
Strings getDefaultNixPath() const;
|
||||
|
||||
static bool isPseudoUrl(std::string_view s);
|
||||
|
||||
|
@ -74,7 +76,7 @@ struct EvalSettings : Config
|
|||
* Implements the `eval-system` vs `system` defaulting logic
|
||||
* described for `eval-system`.
|
||||
*/
|
||||
const std::string & getCurrentSystem();
|
||||
const std::string & getCurrentSystem() const;
|
||||
|
||||
Setting<bool> restrictEval{
|
||||
this, false, "restrict-eval",
|
||||
|
@ -193,8 +195,6 @@ struct EvalSettings : Config
|
|||
)"};
|
||||
};
|
||||
|
||||
extern EvalSettings evalSettings;
|
||||
|
||||
/**
|
||||
* Conventionally part of the default nix path in impure mode.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue