1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Rename makeFSSourceAccessor -> getFSSourceAccessor()

This makes it clearer that it returns a shared accessor object.
This commit is contained in:
Eelco Dolstra 2024-05-06 19:16:52 +02:00
parent eab2919119
commit ef28c7329c
7 changed files with 17 additions and 14 deletions

View file

@ -399,14 +399,14 @@ EvalState::EvalState(
, emptyBindings(0)
, rootFS(
evalSettings.restrictEval || evalSettings.pureEval
? ref<SourceAccessor>(AllowListSourceAccessor::create(makeFSSourceAccessor(), {},
? ref<SourceAccessor>(AllowListSourceAccessor::create(getFSSourceAccessor(), {},
[](const CanonPath & path) -> RestrictedPathError {
auto modeInformation = evalSettings.pureEval
? "in pure evaluation mode (use '--impure' to override)"
: "in restricted mode";
throw RestrictedPathError("access to absolute path '%1%' is forbidden %2%", path, modeInformation);
}))
: makeFSSourceAccessor())
: getFSSourceAccessor())
, corepkgsFS(make_ref<MemorySourceAccessor>())
, internalFS(make_ref<MemorySourceAccessor>())
, derivationInternal{corepkgsFS->addFile(