mirror of
https://github.com/NixOS/nix
synced 2025-06-27 21:01:16 +02:00
Use UnionSourceAccessor to mount the chroot store on top of the real store directory
This commit is contained in:
parent
5b7c240ebd
commit
99e78c37f7
6 changed files with 42 additions and 49 deletions
|
@ -37,7 +37,7 @@ EvalSettings evalSettings {
|
|||
auto [accessor, lockedRef] = flakeRef.resolve(state.store).lazyFetch(state.store);
|
||||
auto storePath = nix::fetchToStore(*state.store, SourcePath(accessor), FetchMode::Copy, lockedRef.input.getName());
|
||||
state.allowPath(storePath);
|
||||
return state.rootPath(state.store->toRealPath(storePath));
|
||||
return state.rootPath(state.store->printStorePath(storePath));
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -179,7 +179,7 @@ SourcePath lookupFileArg(EvalState & state, std::string_view s, const Path * bas
|
|||
state.fetchSettings,
|
||||
EvalSettings::resolvePseudoUrl(s));
|
||||
auto storePath = fetchToStore(*state.store, SourcePath(accessor), FetchMode::Copy);
|
||||
return state.rootPath(CanonPath(state.store->toRealPath(storePath)));
|
||||
return state.rootPath(CanonPath(state.store->printStorePath(storePath)));
|
||||
}
|
||||
|
||||
else if (hasPrefix(s, "flake:")) {
|
||||
|
@ -188,7 +188,7 @@ SourcePath lookupFileArg(EvalState & state, std::string_view s, const Path * bas
|
|||
auto [accessor, lockedRef] = flakeRef.resolve(state.store).lazyFetch(state.store);
|
||||
auto storePath = nix::fetchToStore(*state.store, SourcePath(accessor), FetchMode::Copy, lockedRef.input.getName());
|
||||
state.allowPath(storePath);
|
||||
return state.rootPath(CanonPath(state.store->toRealPath(storePath)));
|
||||
return state.rootPath(CanonPath(state.store->printStorePath(storePath)));
|
||||
}
|
||||
|
||||
else if (s.size() > 2 && s.at(0) == '<' && s.at(s.size() - 1) == '>') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue