mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Add trust-tarballs-from-git-forges setting
If enabled, GitHub flakerefs don't require a content hash, a Git revision is enough. Fixes #10297.
This commit is contained in:
parent
de101417eb
commit
46d9e70c20
2 changed files with 19 additions and 2 deletions
|
@ -294,7 +294,9 @@ struct GitArchiveInputScheme : InputScheme
|
|||
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();
|
||||
return input.getRev().has_value()
|
||||
&& (fetchSettings.trustTarballsFromGitForges ||
|
||||
input.getNarHash().has_value());
|
||||
}
|
||||
|
||||
std::optional<ExperimentalFeature> experimentalFeature() const override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue