Merge pull request #4707 from grahamc/defaul-path-restricted-eval

EvalSettings::getDefaultNixPath: respect {restrict,pure}Eval
This commit is contained in:
Eelco Dolstra 2021-04-14 11:02:58 +02:00 committed by GitHub
commit 709a60a045
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2091,9 +2091,12 @@ Strings EvalSettings::getDefaultNixPath()
} }
}; };
if (!evalSettings.restrictEval && !evalSettings.pureEval) {
add(getHome() + "/.nix-defexpr/channels"); add(getHome() + "/.nix-defexpr/channels");
add(settings.nixStateDir + "/profiles/per-user/root/channels/nixpkgs", "nixpkgs"); add(settings.nixStateDir + "/profiles/per-user/root/channels/nixpkgs", "nixpkgs");
add(settings.nixStateDir + "/profiles/per-user/root/channels"); add(settings.nixStateDir + "/profiles/per-user/root/channels");
}
return res; return res;
} }