8000 fix: only add nix-update-script for non-GitHub fetchers by doronbehar · Pull Request #823 · nix-community/nix-init · GitHub
[go: up one dir, main page]

Skip to content

fix: only add nix-update-script for non-GitHub fetchers - #823

Merged
figsoda merged 1 commit into
nix-community:mainfrom
doronbehar:GH-no-nix-update-script
Jul 6, 2026
Merged

figsoda merged 1 commit into
nix-community:mainfrom
doronbehar:GH-no-nix-update-script

Conversation

@doronbehar
Copy link
Copy Markdown
Contributor

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 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.

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>
@eveeifyeve eveeifyeve left a comment •
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there other platforms like repology that nixpkgs-update supports? Because I think it would be smart to detect this under the hood in a future pr.

Overall that comment is non-blocking, LGTM.

@doronbehar
Copy link
Copy Markdown
Contributor Author

Isn't there other platforms like repology that nixpkgs-update supports?

Yes it supports fetching version info from repology,

Because I think it would be smart to detect this under the hood in a future pr.

But how is that related to nix-update-script?

@eveeifyeve
eveeifyeve commented Jul 5, 2026 •
Copy link
Copy Markdown
Member

Because I think it would be smart to detect this under the hood in a future pr.

But how is that related to nix-update-script?

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.

@doronbehar
Copy link
Copy Markdown
Contributor Author

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 (nix-update, nixpkgs-update & nix-init). In an idealistic future I imagine these will share the common functions and use a single language.

@figsoda figsoda left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@figsoda
figsoda merged commit d0c7207 into nix-community:main Jul 6, 2026
3 checks passed
@doronbehar
Copy link
Copy Markdown
Contributor Author

Maybe we should revert this PR. Apparently Nixpkgs is so much less capable and versatile in comparison to nix-update, that I was pretty much mistaken in NixOS/nixpkgs#502056 . See also:

@figsoda
figsoda commented Jul 29, 2026 •
Copy link
Copy Markdown
Member

@doronbehar #849

katexochen pushed a commit to katexochen/nix-init that referenced this pull request Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0