Overriding version, can't find new cargoHash

I’m running into the same issue trying to bump rio to 0.0.23.
Setting hash to = "" works as expected, you get a hash mismatch and copy the correct one.
Setting cargoHash to = "" keeps producting the same error:

ERROR: cargoHash or cargoSha256 is out of date

Cargo.lock is not the same in /build/rio-0.0.19-vendor.tar.gz

To fix the issue:
1. Set cargoHash/cargoSha256 to an empty string: `cargoHash = "";`
2. Build the derivation and wait for it to fail with a hash mismatch
3. Copy the "got: sha256-..." value back into the cargoHash field
   You should have: cargoHash = "sha256-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=";
Overlay itself:
                  rio = final: prev: {
                    rio-head = prev.rio.overrideAttrs (old: rec {
                      version = "0.0.23";
                      src = nixpkgs.legacyPackages.x86_64-linux.fetchFromGitHub {
                        owner = "raphamorim";
                        repo = "rio";
                        rev = "v${version}";
                        hash = "sha256-X5yQISy8SSSyR0KR5eQ17YbsshjLYqNx6ssaV4qRldg=";
                      };
                      cargoHash = "";
                    });
                  };

It’s also referencing rio-0.0.19 for some reason, same as in your case @jacg.
This is pretty unintuitive and a very bad UX even for someone using nix for over a year.

1 Like