Skip to content

feat: verify github url before updating (fixes #552)#553

Open
lnk3 wants to merge 2 commits into
nix-community:mainfrom
lnk3:check-url-reachable-#552
Open

feat: verify github url before updating (fixes #552)#553
lnk3 wants to merge 2 commits into
nix-community:mainfrom
lnk3:check-url-reachable-#552

Conversation

@lnk3

@lnk3 lnk3 commented Jun 17, 2026

Copy link
Copy Markdown

I will track progress in the PR from the start, so more experienced contributors can give feedback along the way.
I will squash and rebase at the end to have a clean history like it's done in nixpkgs.

Error to fix

$ cabal v2-run nixpkgs-update -- update "steam-tui 0.3.0 0.3.0b https://repology.org/project/steam-tui/versions"
Up to date
[options] github_user: r-ryantm, pull_request: NO, batch_update: NO, calculate_outpaths: NO, cve_report: NO, nixpkgs-review: NO, nixpkgs_dir: "/home/user/.cache/nixpkgs", use attrpath: NO
For attrpath steam-tui, using log file: /run/user/1000/nixpkgs-update/steam-tui/2026-06-17.log
steam-tui 0.3.0 -> 0.3.0b https://repology.org/project/steam-tui/versions
attrpath: steam-tui
[version]
[version] generic version rewriter does not support multiple hashes
[rustCrateVersion]
stderr did not split as expected full stderr was:
warning: unknown experimental feature 'pipe-operators'
warning: unknown setting 'always-allow-substitutes'
this derivation will be built:
  /nix/store/07am4w42dwck9xh0hdz5sh8x1kd41rj6-source.drv
building '/nix/store/07am4w42dwck9xh0hdz5sh8x1kd41rj6-source.drv'...
structuredAttrs is enabled

trying https://github.com/dmadisetti/steam-tui/archive/0.3.0b.tar.gz
...
curl: (22) The requested URL returned error: 404
error: cannot download source from any mirror
error: Cannot build '/nix/store/07am4w42dwck9xh0hdz5sh8x1kd41rj6-source.drv'.
...
error: Build failed due to failed dependency

[result] Failed to update steam-tui 0.3.0 -> 0.3.0b https://repology.org/project/steam-tui/versions

Error fixed

$ cabal v2-run nixpkgs-update -- update "steam-tui 0.3.0 0.3.0b https://repology.org/project/steam-tui/versions"
Up to date
[options] github_user: r-ryantm, pull_request: NO, batch_update: NO, calculate_outpaths: NO, cve_report: NO, nixpkgs-review: NO, nixpkgs_dir: "/home/user/.cache/nixpkgs", use attrpath: NO
For attrpath steam-tui, using log file: /run/user/1000/nixpkgs-update/steam-tui/2026-06-17.log
steam-tui 0.3.0 -> 0.3.0b https://repology.org/project/steam-tui/versions
attrpath: steam-tui
The new url doesn't exist: https://github.com/dmadisetti/steam-tui/archive/0.3.0b.tar.gz
[result] Failed to update steam-tui 0.3.0 -> 0.3.0b https://repology.org/project/steam-tui/versions

Tests

$ cabal v2-test
Build profile: -w ghc-9.2.4 -O1
In order, the following will be built (use -v for more details):
 - nixpkgs-update-0.4.0 (test:spec) (first run)
Preprocessing test suite 'spec' for nixpkgs-update-0.4.0..
Building test suite 'spec' for nixpkgs-update-0.4.0..
Running 1 test suites...
Test suite spec: RUNNING...
Test suite spec: PASS
Test suite logged to:
/home/user/nixpkgs-update/check-url-reachable-#552/dist-newstyle/build/x86_64-linux/ghc-9.2.4/nixpkgs-update-0.4.0/t/spec/test/nixpkgs-update-0.4.0-spec.log
1 of 1 test suites (1 of 1 test cases) passed.

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.

1 participant