Skip to content

fix: fetch the gen and nix-effects fallbacks as .tar.gz - #771

Merged
sini merged 1 commit into
mainfrom
fix/gen-fallback-tarball
Nov 17, 2026
Merged

sini merged 1 commit into
mainfrom
fix/gen-fallback-tarball

Conversation

@sini

@sini sini commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reported by @Keyruu in #770. When a config doesn't declare a gen input, den fetches gen itself (nix/lib/schema.nix), and it does so by handing GitHub's .zip archive URL to builtins.fetchTarball. On their fresh machine that failed:

cannot read the tarball: numeric field was not a number: 22e551eb when getting cksum for PK

That's a tar reader meeting a zip's PK header. The nix-effects fallback in nix/lib/fx.nix has the same shape.

This switches both fallbacks to GitHub's .tar.gz archive, which is what fetchTarball is documented to take. GitHub's .zip and .tar.gz archives of one rev unpack to the same tree, so the narHash pins in the CI lock still match and nothing else changes.

Nix, Determinate and Lix all unpack the zip (table below), so the failure isn't theirs. The reporter's config evaluates with iets, which unpacks with the Rust tar crate and has no zip reader; the error is word for word numtide/iets#300, which reports this same fallback at the same gen rev. The change is correct either way: it stops depending on fetchTarball also accepting a format it isn't documented for.

Validation

  • The gen fetch at den's pinned rev and narHash, each evaluator in a fresh, empty store and fetcher cache:

    evaluator .zip .tar.gz
    Nix 2.34.9 unpacks unpacks
    Nix 2.35.6 unpacks unpacks
    Determinate Nix 3.24.2 (2.35.3), lazy-trees on and off unpacks unpacks
    Lix 2.95.4 unpacks unpacks
    Lix 2.97.0-pre unpacks unpacks

    Every row gives the same store path.

  • den's patched schema.nix and fx.nix, imported with no gen or nix-effects input so both fallbacks run, each in a fresh store: evaluate on Nix 2.34.9, Determinate 3.24.2 (lazy-trees on and off) and Lix 2.95.4.

  • Full suite (ci.bash, 4 workers): 2208/2208. CI declares both inputs, so the suite never takes the fallbacks; it only shows nothing else moved.

Both fallbacks handed GitHub's .zip archive URL to builtins.fetchTarball, which is documented for tarballs. An evaluator without a zip reader fails on it. GitHub's .zip and .tar.gz archives of one rev unpack to the same tree, so the narHash pins in the CI lock are unchanged.

Reported in GitHub #770.
@github-actions github-actions Bot added the allow-ci allow all CI integration tests label Nov 17, 2026
@sini
sini merged commit 696c53c into main Nov 17, 2026
17 checks passed
@sini
sini deleted the fix/gen-fallback-tarball branch November 17, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow-ci allow all CI integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant