8000 feat: add `passthru.updateScript` where nurl fetchers are known by KiaraGrouwstra · Pull Request #768 · nix-community/nix-init · GitHub
[go: up one dir, main page]

Skip to content

feat: add passthru.updateScript where nurl fetchers are known - #768

Merged
figsoda merged 3 commits into
nix-community:mainfrom
KiaraGrouwstra:passthru-update-script
Apr 10, 2026
Merged

figsoda merged 3 commits into
nix-community:mainfrom
KiaraGrouwstra:passthru-update-script

Conversation

@KiaraGrouwstra
Copy link
Copy Markdown
Contributor

Adds passthru.updateScript = nix-update-script { }; where nurl fetchers are known.

closes #642.

dsisclaimer i used a coding agent in the creation of this patch.

KiaraGrouwstra and others added 3 commits April 10, 2026 12:46
There used to be a convention to sort arguments by the order they are
used, which nix-init follows. It was removed[1] due to the lack of
tooling to enforce it, but it doesn't hurt for nix-init to keep
following it for consistency.

[1]: NixOS/nixpkgs#247424
@figsoda
figsoda merged commit 20b6238 into nix-community:main Apr 10, 2026
3 checks passed
@figsoda
figsoda commented Apr 10, 2026
Copy link
Copy Markdown
Member

thanks

@doronbehar
Copy link
Copy Markdown
Contributor

As I tried to explain in NixOS/nixpkgs#502056 and #642, this PR wasn't fully accurate. Here's a fix:

@KiaraGrouwstra
KiaraGrouwstra deleted the passthru-update-script branch July 2, 2026 16:00
figsoda pushed a commit that referenced this pull request Jul 6, 2026
PR #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>
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.

set passthru.updateScript?

3 participants

0