mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02: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
|
@ -229,6 +229,14 @@ struct GitArchiveInputScheme : InputScheme
|
|||
{
|
||||
return Xp::Flakes;
|
||||
}
|
||||
|
||||
std::optional<std::string> getFingerprint(ref<Store> store, const Input & input) const override
|
||||
{
|
||||
if (auto rev = input.getRev())
|
||||
return rev->gitRev();
|
||||
else
|
||||
return std::nullopt;
|
||||
}
|
||||
};
|
||||
|
||||
struct GitHubInputScheme : GitArchiveInputScheme
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue