Skip to content

CI/build failure: official Nix 2.34.4 installer expects a different SHA-256 than the currently served x86_64-linux tarballΒ #15564

Closed

Description

@kevinveenbirkenbach

Describe the bug

The official Nix installer currently expects a different SHA-256 than the x86_64 Linux tarball that is being served from releases.nixos.org.

At the moment, the installer at:

redirects to the Nix 2.34.4 installer and expects this SHA-256 for nix-2.34.4-x86_64-linux.tar.xz:

  • f5096772a4b1d735de774b0a6fd1a3d17a0b82d6ca1a7c8382cd7ab15c9be3a4

But downloading the tarball currently yields:

  • 595669eb6db6117135ca8ba6667b273eaf980a47523a92e61ed963556cd547b8

This causes bootstrap to fail with a hash mismatch before nix is installed.

Steps To Reproduce

  1. Use a fresh Linux x86_64 environment with curl, tar, xz, and sha256sum.
  2. Download and run the official installer:
curl -fsSL https://nixos.org/nix/install -o /tmp/install-nix.sh
sh /tmp/install-nix.sh --no-daemon
  1. Observe the SHA-256 mismatch error.

You can also verify the mismatch directly:

curl -fsSL https://releases.nixos.org/nix/nix-2.34.4/nix-2.34.4-x86_64-linux.tar.xz | sha256sum

Current result:

595669eb6db6117135ca8ba6667b273eaf980a47523a92e61ed963556cd547b8  -

Expected behavior

The installer-embedded SHA-256 and the currently served tarball should match, and the installation should proceed successfully.

Metadata

nix-env --version is unavailable in this case because the bootstrap fails before nix is installed.

Observed on Linux x86_64.

Additional context

Installer error seen downstream:

SHA-256 hash mismatch in 'https://releases.nixos.org/nix/nix-2.34.4/nix-2.34.4-x86_64-linux.tar.xz'; expected f5096772a4b1d735de774b0a6fd1a3d17a0b82d6ca1a7c8382cd7ab15c9be3a4, got 595669eb6db6117135ca8ba6667b273eaf980a47523a92e61ed963556cd547b8

Downstream CI example:

This looks like an upstream installer / release artifact / CDN inconsistency rather than a downstream application bug.

Checklist

job-logs.txt

Activity

  1. SubaruArai commented on Mar 26, 2026

    @SubaruArai

    Just FYI, it doesn't match one version earlier (2.34.3) either.
    7888ca3b586d026e149e866cda9ecb228811bd98d9f56b8c58a5e9106151ffd0

  2. SubaruArai commented on Mar 26, 2026

    @SubaruArai

    What's the proper way to circumvent? I.e. how can I know the proper hash or an older version's hash?

  3. SubaruArai commented on Mar 26, 2026

    @SubaruArai

    Found it.
    https://hydra.nixos.org/job/nix/maintenance-2.34/installerScript/all
    Build 325163674 is for 2.34.4, and it has the hash mismatch.
    Build 324420758 is for 2.34.3, and the hash is correct.
    This is the link to the install script for 2.34.3, for anyone that need it now:
    https://hydra.nixos.org/build/324420758/download/1/install

  4. kevinveenbirkenbach commented on Mar 26, 2026

    @kevinveenbirkenbach
    Author

    Found it. https://hydra.nixos.org/job/nix/maintenance-2.34/installerScript/all Build 325163674 is for 2.34.4, and it has the hash mismatch. Build 324420758 is for 2.34.3, and the hash is correct. This is the link to the install script for 2.34.3, for anyone that need it now: https://hydra.nixos.org/build/324420758/download/1/install

    Thanks a lot :) Still keeping this open until a sustainable solution is implemented :)

  5. SubaruArai commented on Mar 26, 2026

    @SubaruArai

    Thank you for posting this issue! I was thinking if I did something wrong.
    Also, you'll need to thank :the ai: ;)
    I wouldn't be able to dig this deep into the build system without it.
    (well, I could but not within work hours)

  6. self-assigned this
    on Mar 26, 2026
  7. kevinveenbirkenbach commented on Mar 26, 2026

    @kevinveenbirkenbach
    Author

    FYI: Also raised awreness in the Matrix channel :)

    Image
  8. xokdvium commented on Mar 26, 2026

    @xokdvium
    Contributor

    Somehow hydra built the wrong install script:

    Tarball is from this https://hydra.nixos.org/build/325162956

    curl https://hydra.nixos.org/build/325162956/download/1/nix-2.34.4-x86_64-linux.tar.xz | sha256sum
    595669eb6db6117135ca8ba6667b273eaf980a47523a92e61ed963556cd547b8
    

    This is what we uploaded too:

    curl https://releases.nixos.org/nix/nix-2.34.4/nix-2.34.4-x86_64-linux.tar.xz.sha256
    595669eb6db6117135ca8ba6667b273eaf980a47523a92e61ed963556cd547b8
    curl https://releases.nixos.org/nix/nix-2.34.4/nix-2.34.4-x86_64-linux.tar.xz | sha256sum
    595669eb6db6117135ca8ba6667b273eaf980a47523a92e61ed963556cd547b8
    nix store cat --store "https://cache.nixos.org/" "/nix/store/x7svz9b68aj74cslr96hgkf784shxla8-nix-binary-tarball-2.34.4/nix-2.34.4-x86_64-linux.tar.xz" | sha256sum
    595669eb6db6117135ca8ba6667b273eaf980a47523a92e61ed963556cd547b8
    

    The install script for 2.34.4 (https://releases.nixos.org/nix/nix-2.34.4/install):

    Linux.x86_64)
            hash=f5096772a4b1d735de774b0a6fd1a3d17a0b82d6ca1a7c8382cd7ab15c9be3a4
            path=x7svz9b68aj74cslr96hgkf784shxla8/nix-2.34.4-x86_64-linux.tar.xz
            system=x86_64-linux
            ;;
    

    Notice that the input addressed path is the same x7svz9b68aj74cslr96hgkf784shxla8/nix-2.34.4-x86_64-linux.tar.xz - but the hash is unexpected. https://hydra.nixos.org/build/325163674/download/1/install

    So hydra calculated the wrong hash for reasons unclear. All other tarball hashes in the installer seem to be correct.

  9. kevinveenbirkenbach commented on Mar 26, 2026

    @kevinveenbirkenbach
    Author

    Could you please manual trigger hydra again? May it was just an Single-event upset, if it worked until now :)

  10. xokdvium commented on Mar 26, 2026

    @xokdvium
    Contributor

    Ah seems like the build got retried https://hydra.nixos.org/build/325162956#tabs-buildsteps on different machines. And with the tarball being non-reproducible due to an ordering issue #15565 we wound up with a franken-build.

  11. Mic92 commented on Mar 26, 2026

    @Mic92
    Member

    I digged in hydra logs and here is the breakdown of what I found:

    The x86_64-linux tarball derivation (9piv8l3vvj5iabsjsnjyj754xcy0mfni-nix-binary-tarball-2.34.4.drv) was built on two different builders within minutes of each other. They produced different contents for the same output path x7svz9b68aj74cslr96hgkf784shxla8:

    • 22:16 on sleepy-brown β†’ NAR size 25,695,176 bytes (wrong tarball, hashes to f5096772...)
    • 22:21 on elated-minsky β†’ NAR size 25,745,752 bytes (correct tarball, hashes to 595669eb...)

    The second upload to the binary cache overwrote the first, so the cache ended up with the correct tarball. But sleepy-brown still had the wrong version sitting in its local Nix store.

    When the installer-script build (2ri7ilj7..., build 325163674) got scheduled on sleepy-brown at 22:31, it picked up the wrong local copy of the tarball as its input dependency. nix hash-file dutifully hashed that wrong tarball and embedded f5096772... into the install script. A second installer-script (gjgln519, on sleepy-brown at 22:28) has the same wrong hash, confirming it's builder-specific.

    Installer-scripts built on other machines only hash their native platform's tarball and got correct results. You can see this in the build logs where maximum-snail (macOS) only emits one hash-file warning vs eight on sleepy-brown.

  12. Mic92 commented on Mar 26, 2026

    @Mic92
    Member

    Fixed in the releases bucket directly by updating the script to contain the right hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions