mirror of
https://github.com/NixOS/nix
synced 2025-07-03 06:11:46 +02:00
Store a ref to InputAccessor in SourcePath
This commit is contained in:
parent
72dffd6c6c
commit
a18b3c665a
14 changed files with 44 additions and 31 deletions
|
@ -94,7 +94,8 @@ SourcePath lookupFileArg(EvalState & state, std::string_view s)
|
|||
if (isUri(s)) {
|
||||
auto storePath = fetchers::downloadTarball(
|
||||
state.store, resolveUri(s), "source", false).first.storePath;
|
||||
auto & accessor = state.registerAccessor(makeFSInputAccessor(CanonPath(state.store->toRealPath(storePath))));
|
||||
auto accessor = makeFSInputAccessor(CanonPath(state.store->toRealPath(storePath)));
|
||||
state.registerAccessor(accessor);
|
||||
return {accessor, CanonPath::root};
|
||||
} else if (s.size() > 2 && s.at(0) == '<' && s.at(s.size() - 1) == '>') {
|
||||
Path p(s.substr(1, s.size() - 2));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue