mirror of
https://github.com/NixOS/nix
synced 2025-07-04 03:01:47 +02:00
fetchOrSubstituteTree(): Return an accessor
This prepares lazy access to flake.nix etc.
This commit is contained in:
parent
3c109095de
commit
1ab97a70f5
4 changed files with 54 additions and 19 deletions
|
@ -289,6 +289,12 @@ std::pair<StorePath, FlakeRef> FlakeRef::fetchTree(ref<Store> store) const
|
|||
return {std::move(storePath), FlakeRef(std::move(lockedInput), subdir)};
|
||||
}
|
||||
|
||||
std::pair<ref<SourceAccessor>, FlakeRef> FlakeRef::lazyFetch(ref<Store> store) const
|
||||
{
|
||||
auto [accessor, lockedInput] = input.getAccessor(store);
|
||||
return {accessor, FlakeRef(std::move(lockedInput), subdir)};
|
||||
}
|
||||
|
||||
std::tuple<FlakeRef, std::string, ExtendedOutputsSpec> parseFlakeRefWithFragmentAndExtendedOutputsSpec(
|
||||
const fetchers::Settings & fetchSettings,
|
||||
const std::string & url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue