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:
parent
5373f4be3b
commit
75efa42134
10 changed files with 27 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue