mirror of
https://github.com/NixOS/nix
synced 2025-06-25 23:11:16 +02:00
GitArchiveInputScheme: Require a NAR hash
This commit is contained in:
parent
071dd2b3a4
commit
09d76e512a
1 changed files with 5 additions and 1 deletions
|
@ -282,7 +282,11 @@ struct GitArchiveInputScheme : InputScheme
|
||||||
|
|
||||||
bool isLocked(const Input & input) const override
|
bool isLocked(const Input & input) const override
|
||||||
{
|
{
|
||||||
return (bool) input.getRev();
|
/* Since we can't verify the integrity of the tarball from the
|
||||||
|
Git revision alone, we also require a NAR hash for
|
||||||
|
locking. FIXME: in the future, we may want to require a Git
|
||||||
|
tree hash instead of a NAR hash. */
|
||||||
|
return input.getRev().has_value() && input.getNarHash().has_value();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<ExperimentalFeature> experimentalFeature() const override
|
std::optional<ExperimentalFeature> experimentalFeature() const override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue