Hash mismatch error for `ccache` when updating

Trying to update the nixpkgs input of my flake-based NixOS system (nixos-unstable), I get the following error:

building the system configuration...
warning: Git tree '/home/jco/nixos-flake' is dirty
error: hash mismatch in fixed-output derivation '/nix/store/0bfy7lzybvv8j2v1m8wv09lk508blp41-source.drv':
         specified: sha256-h1lhR8P4aNM6tQCodhpEIXwA0bUQ26B3aoiQeX2siCU=
            got:    sha256-y3C1iY/lKy8CB9s1mhm9Xbg2TmM9yv0I7tGS/ZkKMQQ=
error: 1 dependencies of derivation '/nix/store/f1vimpkpsinw9xvb9fz5kw0bs98mnhp9-ccache-4.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ll7an8zkx6886hs5gaf23wkgygr2s55v-ccache-links.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3x9ldz68jdvjjkwgs8068pbxhjrx5jpk-ccache-links-wrapper-.drv' failed to build
[2/35/95 built (1 failed), 16/82/115 copied (1147.2/2190.6 MiB), 253.7/618.1 MiB DL] building zoom_x86_64.pkg.tar.xz:   0     0    0     0
error: 1 dependencies of derivation '/nix/store/ck80x852kaf59b4fja5is46rjrmkx4b5-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/p4lasxa011llwjgclmiykvpxs5hm2wab-nixos-system-nixos-ryzen9-22.05.20220305.062a0c5.drv' failed to build
error: Recipe `rebuild-system` failed with exit code 102

Does anyone have an idea of what this is about, or how I could find out more about the error?

A hash mismatch was somehow introduced in ccache: 4.5.1 -> 4.6 by r-ryantm · Pull Request #162139 · NixOS/nixpkgs · GitHub. The fix was merged a few days ago in ccache: fix download hash by vcunat · Pull Request #162868 · NixOS/nixpkgs · GitHub, and while that hasn’t yet hit unstable (as you can see here: https://nixpk.gs/pr-tracker.html?pr=162868) it is in unstable-small, so you might want to consider using that for a few days if this is blocking something crucial for you.

2 Likes