How do you override the commit rev used by a Rust package?

I had the same problem and used this solution:

that would make your code something like:

nixpkgs.overlays = [
  (final: prev: {
    wpaperd = prev.wpaperd.overrideAttrs (old: rec {
      src = prev.fetchFromGitHub {
        owner = "danyspin97";
        repo = "wpaperd";
        rev = "b4d956821c6b365adeb5bb4fd0d555a3bb90193d";
        hash = "sha256-AE2h6kkpeDlL9u7MODTbgot9gwH9VwUl884xca7Rx8w=";
      };
      cargoDeps = old.cargoDeps.overrideAttrs {
        inherit src;
        outputHash = lib.fakeHash;
      };
    });
  })
];