update-python-libraries: Reliably detect nix-prefetch-git

Makes sure that any attribute that triggers using fetchGit will result in
the updater using nix-prefetch-git.
This commit is contained in:
Martin Weinelt 2024-06-27 01:10:21 +02:00
parent c4e5920816
commit 27aa2c8a9d
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -284,7 +284,7 @@ def _get_latest_version_github(attr_path, package, extension, current_version, t
if _get_attr_value(f"{attr_path}.src.leaveDotGit"):
git_fetcher_args.append("--leave-dotGit")
if git_fetcher_args:
if git_fetcher_args or _get_attr_value(f"{attr_path}.src.fetcher").endswith("nix-prefetch-git"):
algorithm = "sha256"
cmd = [
"nix-prefetch-git",