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

Remove FSInputAccessor

This commit is contained in:
Eelco Dolstra 2024-05-03 12:30:28 +02:00
parent ba5929c7be
commit 20558e0462
15 changed files with 48 additions and 58 deletions

View file

@ -15,7 +15,6 @@
#include "function-trace.hh"
#include "profiles.hh"
#include "print.hh"
#include "fs-input-accessor.hh"
#include "filtering-input-accessor.hh"
#include "memory-source-accessor.hh"
#include "signals.hh"
@ -400,14 +399,14 @@ EvalState::EvalState(
, emptyBindings(0)
, rootFS(
evalSettings.restrictEval || evalSettings.pureEval
? ref<SourceAccessor>(AllowListInputAccessor::create(makeFSInputAccessor(), {},
? ref<SourceAccessor>(AllowListInputAccessor::create(makeFSSourceAccessor(), {},
[](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);
}))
: makeFSInputAccessor())
: makeFSSourceAccessor())
, corepkgsFS(make_ref<MemorySourceAccessor>())
, internalFS(make_ref<MemorySourceAccessor>())
, derivationInternal{corepkgsFS->addFile(