# Nixpkgs overlay for mpd-discord-rpc is no longer working

**URL:** https://discourse.nixos.org/t/nixpkgs-overlay-for-mpd-discord-rpc-is-no-longer-working/59982
**Category:** Help
**Created:** [February 8, 2025, 2:21pm UTC](https://discourse.nixos.org/t/nixpkgs-overlay-for-mpd-discord-rpc-is-no-longer-working/59982 "2025-02-08T14:21:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![fazzi](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fazzi/32/31039_2.png) [@fazzi](https://discourse.nixos.org/u/fazzi)
#### Post date: [February 8, 2025, 2:21pm UTC](https://discourse.nixos.org/t/nixpkgs-overlay-for-mpd-discord-rpc-is-no-longer-working/59982/1 "2025-02-08T14:21:31Z")

</div>

hello all!! I had an overlay for mpd-discord-rpc to make it use the latest from git (has a change that I wanted), i had it like so which was working for a few months:

```nix
      package = pkgs.mpd-discord-rpc.overrideAttrs (oldAttrs: rec {
        pname = "mpd-discord-rpc-git";
        src = npins.mpd-discord-rpc;
        cargoDeps = oldAttrs.cargoDeps.overrideAttrs {
          inherit src;
          outputHash = "sha256-uDru6npxi+NU/KzCa8uoGqvLrJwMB+PGWl7rneyubCY=";
        };
      });

```

My full config for mpd-discord-rpc is available here: [home/modules/music/mpd/mpd-discord-rpc/default.nix · main · Fazzi / NixOhEss · GitLab](https://gitlab.com/fazzi/nixohess/-/blob/main/home/modules/music/mpd/mpd-discord-rpc/default.nix?ref_type=heads)

however after updating last night (and adding an overlay for that [basedpyright build failure](https://github.com/NixOS/nixpkgs/issues/380079)), this no longer works, i get this error on rebuild:

```auto
mpd-discord-rpc-1.7.3-vendor> Unpacking to /nix/store/q1hkj0884jhch9g80k1yigvglixsi5p1-mpd-discord-rpc-1.7.3-vendor/zerocopy-derive-0.7.32
error: output path '/nix/store/a58jwn5pbh869j8xmyrmiswm38pgl0my-mpd-discord-rpc-1.7.3-vendor.drv.chroot/root/nix/store/q1hkj0884jhch9g80k1yigvglixsi5p1-mpd-discord-rpc-1.7.3-vendor' should be a non-executable regular file since recursive hashing is not enabled (one of outputHashMode={flat,text} is true)
error: 1 dependencies of derivation '/nix/store/bxxmzg37mkb78p51ai32nvav65szpj71-mpd-discord-rpc-git-1.7.3.drv' failed to build

```

Is this a change in nixos which is causing my overlay to no longer work? I am on nixos-unstable, and commenting out this package override does make it build fine. There were no changes to upstream mpd-discord-rpc between this working and being broken either.

So how can I get this working again? Any help would be greatly appreciated 🙂

---

<div class="post-metadata">

### Author: ![perchun](https://discourse.nixos.org/user_avatar/discourse.nixos.org/perchun/32/28793_2.png) [@perchun](https://discourse.nixos.org/u/perchun)
#### Post date: [February 8, 2025, 3:51pm UTC](https://discourse.nixos.org/t/nixpkgs-overlay-for-mpd-discord-rpc-is-no-longer-working/59982/2 "2025-02-08T15:51:08Z")

</div>

You should not try to override `fetch*` functions (including `cargoDeps`), here is the right overlay

```nix
      package = pkgs.mpd-discord-rpc.overrideAttrs (oldAttrs: rec {
        pname = "mpd-discord-rpc-git";
        src = npins.mpd-discord-rpc;
        cargoDeps = final.rustPlatform.fetchCargoVendor {
          inherit src;
          hash = "sha256-uDru6npxi+NU/KzCa8uoGqvLrJwMB+PGWl7rneyubCY=";
        };
      });
```

---

<div class="post-metadata">

### Author: ![phanirithvij](https://discourse.nixos.org/user_avatar/discourse.nixos.org/phanirithvij/32/28729_2.png) [@phanirithvij](https://discourse.nixos.org/u/phanirithvij)
#### Post date: [February 23, 2025, 1:27pm UTC](https://discourse.nixos.org/t/nixpkgs-overlay-for-mpd-discord-rpc-is-no-longer-working/59982/3 "2025-02-23T13:27:37Z")

</div>

when did this change?

because previously the infamous crago256Hash discourse thread has overriding cargoDeps as the solution [Is it possible to override cargoSha256 in buildRustPackage? - #3 by aszlig](https://discourse.nixos.org/t/is-it-possible-to-override-cargosha256-in-buildrustpackage/4393/3).

---

<div class="post-metadata">

### Author: ![fazzi](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fazzi/32/31039_2.png) [@fazzi](https://discourse.nixos.org/u/fazzi)
#### Post date: [February 23, 2025, 2:08pm UTC](https://discourse.nixos.org/t/nixpkgs-overlay-for-mpd-discord-rpc-is-no-longer-working/59982/4 "2025-02-23T14:08:38Z")

</div>

This is what I originally followed. Hence why it was my original working solution. It stopped working within the past 2 or 3 weeks
