Trying to use particular revision of Neovide

Hi,

I have reached this point (in environment.systemPackages):

(neovide.overrideAttrs {
          src = fetchFromGitHub {
            owner = "neovide";
            repo = "neovide";
            rev = "88a7438b7ace290f8339ad276b72cb5723cbb627";
            hash = "sha256-acxPETjqnywhXiMOULfoEYqUPmh036QwKYOP/7mF9A0=";
          };
          cargoHash = "";
        })

and hit

ERROR: cargoHash or cargoSha256 is out of date

Cargo.lock is not the same in /build/neovide-0.15.2-vendor

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=";

(hence the empty cargoHash) but I don’t see the correct hash in the log after putting empty cargoHash

instead of cargoHash = "" you have to deps = old.deps.overrideAttrs (_: { outputHash = …;}), or something like that, if I recall correctly.

giving up, as soon as you want something out of the path, it’s a hell hole T_T

It really isn’t so bad, this is just a rust-specific papercut. This post describes your exact issue, why it is the way it is, and how you achieve what you want: Is it possible to override cargoSha256 in buildRustPackage?

It’s not off-the-beaten-path, you’ve found one of the many thoroughly beaten paths that aren’t very well-documented.

Unfortunately, the software ecosystem has lots of idiosyncratic sub-ecosystems, and nixpkgs faces the rather difficult problem of trying to standardize them all.

Be glad you’re not trying to override a gradle dep :smiley: