1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 03:21:16 +02:00

Move <nix/fetchurl.nix> into the nix binary

This makes the statically linked nix binary just work, without needing
any additional files.
This commit is contained in:
Eelco Dolstra 2020-12-22 14:43:20 +01:00
parent 5373f4be3b
commit 75efa42134
10 changed files with 27 additions and 22 deletions

View file

@ -402,11 +402,6 @@ EvalState::EvalState(const Strings & _searchPath, ref<Store> store)
for (auto & i : evalSettings.nixPath.get()) addToSearchPath(i);
}
try {
addToSearchPath("nix=" + canonPath(settings.nixDataDir + "/nix/corepkgs", true));
} catch (Error &) {
}
if (evalSettings.restrictEval || evalSettings.pureEval) {
allowedPaths = PathSet();
@ -457,6 +452,8 @@ Path EvalState::checkSourcePath(const Path & path_)
*/
Path abspath = canonPath(path_);
if (hasPrefix(abspath, corepkgsPrefix)) return abspath;
for (auto & i : *allowedPaths) {
if (isDirOrInDir(abspath, i)) {
found = true;