mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
getDefaultNixPath: actually respect {restrict,pure}-eval
Previously, getDefaultNixPath was called too early: at initialisation time, before CLI and config have been processed, when `restrictEval` and `pureEval` both have their default value `false`. Call it when initialising the EvalState instead, and use `setDefault`.
This commit is contained in:
parent
f233fd496d
commit
1cba5984a6
4 changed files with 31 additions and 17 deletions
|
@ -570,7 +570,7 @@ struct EvalSettings : Config
|
|||
{
|
||||
EvalSettings();
|
||||
|
||||
static Strings getDefaultNixPath();
|
||||
Strings getDefaultNixPath();
|
||||
|
||||
static bool isPseudoUrl(std::string_view s);
|
||||
|
||||
|
@ -580,7 +580,7 @@ struct EvalSettings : Config
|
|||
"Whether builtin functions that allow executing native code should be enabled."};
|
||||
|
||||
Setting<Strings> nixPath{
|
||||
this, getDefaultNixPath(), "nix-path",
|
||||
this, {}, "nix-path",
|
||||
"List of directories to be searched for `<...>` file references."};
|
||||
|
||||
Setting<bool> restrictEval{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue