Commit ce9edd60 authored by Pratham Patel's avatar Pratham Patel Committed by Masum Reza
Browse files

cosmic-settings-daemon: substitute generic "Pop theme" path

The directory `/usr/share/sounds/Pop/` is not accessible on NixOS
because the directory `/usr` does not exist on NixOS. The package
`pop-gtk-theme` exists in nixpkgs that provides this exact "theme
sound" which upstream uses. Substitute the FHS path with the path of the
`pop-gtk-theme` package from the Nix store.
parent 56dde4fe
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
  fetchFromGitHub,
  stdenv,
  rustPlatform,
  pop-gtk-theme,
  pkg-config,
  geoclue2-with-demo-agent,
  libinput,
@@ -21,6 +22,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
    hash = "sha256-DtwW6RxHnNh87Xu0NCULfUsHNzYU9tHtFKE9HO3rvME=";
  };

  postPatch = ''
    substituteInPlace src/battery.rs \
      --replace-fail '/usr/share/sounds/Pop/' '${pop-gtk-theme}/share/sounds/Pop/'
  '';

  useFetchCargoVendor = true;
  cargoHash = "sha256-lGzQBL9IXbPsaKeVHp34xkm5FnTxWvfw4wg3El4LZdA=";