#include "fs-input-accessor.hh" #include "posix-source-accessor.hh" #include "store-api.hh" namespace nix { struct FSInputAccessor : InputAccessor, PosixSourceAccessor { using PosixSourceAccessor::PosixSourceAccessor; }; ref makeFSInputAccessor() { return make_ref(); } ref makeFSInputAccessor(std::filesystem::path root) { return make_ref(std::move(root)); } ref makeStorePathAccessor( ref store, const StorePath & storePath) { // FIXME: should use `store->getFSAccessor()` return makeFSInputAccessor(std::filesystem::path { store->toRealPath(storePath) }); } SourcePath getUnfilteredRootPath(CanonPath path) { static auto rootFS = makeFSInputAccessor(); return {rootFS, path}; } }