mirror of
https://github.com/NixOS/nix.git
synced 2025-12-13 04:21:04 +01:00
Persistently cache InputAccessor::fetchToStore()
This avoids repeated copying of the same source tree between Nix invocations. It requires the accessor to have a "fingerprint" (e.g. a Git revision) that uniquely determines its contents.
This commit is contained in:
parent
f450c8773c
commit
99d5204baa
8 changed files with 77 additions and 3 deletions
|
|
@ -108,6 +108,11 @@ Input Input::fromAttrs(Attrs && attrs)
|
|||
return std::move(*res);
|
||||
}
|
||||
|
||||
std::optional<std::string> Input::getFingerprint(ref<Store> store) const
|
||||
{
|
||||
return scheme ? scheme->getFingerprint(store, *this) : std::nullopt;
|
||||
}
|
||||
|
||||
ParsedURL Input::toURL() const
|
||||
{
|
||||
if (!scheme)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue