Repository navigation
fix: only add nix-update-script for non-GitHub fetchers - #823
Conversation
PR nix-community#768 added `passthru.updateScript = nix-update-script { };` for all packages where the fetcher is known. However, as clarified in [NixOS/nixpkgs#502056](NixOS/nixpkgs#502056), this is redundant for GitHub-hosted packages: `nixpkgs-update` (r-ryantm) already discovers and updates those automatically via native GitHub releases discovery, without needing an explicit `updateScript`. `nix-update-script` is genuinely useful for forges like GitLab and Gitea where Repology coverage is weaker and `nix-update` finds new versions more reliably. Restrict the condition to known fetchers other than `fetchFromGitHub`, remove `nix-update-script` from the GitHub-based test fixtures, and add a new `fetchFromGitLab` test (`gitlab.com/emilua/beast`) that exercises the case where `nix-update-script` is correctly emitted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Yes it supports fetching version info from repology,
But how is that related to |
It's related as this pr to add nix-update-script only for non-github fetchers since nixpkgs-update supports github. I mention this an idea for future pr to have a way to detect what nixpkgs-update supports then when it doesn't support something but nix-update does it adds nix-update-script. |
|
Oh I see now what you mean by "detect what nixpkgs-update supports". In general the auto update and nix-init ecosystem is in a mess if you ask me - We have 3 tools written in 3 different languages for fetching sources and writing / substituting hashes ( |
|
Maybe we should revert this PR. Apparently Nixpkgs is so much less capable and versatile in comparison to |
PR #768 added
passthru.updateScript = nix-update-script { };for all packages where the fetcher is known. However, as clarified in NixOS/nixpkgs#502056, this is redundant for GitHub-hosted packages:nixpkgs-update(r-ryantm) already discovers and updates those automatically via native GitHub releases discovery, without needing an explicitupdateScript.nix-update-scriptis genuinely useful for forges like GitLab and Gitea where Repology coverage is weaker andnix-updatefinds new versions more reliably.Restrict the condition to known fetchers other than
fetchFromGitHub, removenix-update-scriptfrom the GitHub-based test fixtures, and add a newfetchFromGitLabtest (gitlab.com/emilua/beast) that exercises the case wherenix-update-scriptis correctly emitted.