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

cosmic-settings-daemon: substitute the GTK3 theme path

The directory `/usr/share/themes/adw-gtk3*` is not accessible on NixOS
because the directory `/usr` does not exist on NixOS. The package
`adw-gtk3` exists in nixpkgs that provides this exact GTK theme which
upstream uses. Substitute the FHS path with the path of the
`adw-gtk3` package from the Nix store.
parent ce9edd60
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
  stdenv,
  rustPlatform,
  pop-gtk-theme,
  adw-gtk3,
  pkg-config,
  geoclue2-with-demo-agent,
  libinput,
@@ -25,6 +26,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
  postPatch = ''
    substituteInPlace src/battery.rs \
      --replace-fail '/usr/share/sounds/Pop/' '${pop-gtk-theme}/share/sounds/Pop/'
    substituteInPlace src/theme.rs \
      --replace-fail '/usr/share/themes/adw-gtk3' '${adw-gtk3}/share/themes/adw-gtk3'
  '';

  useFetchCargoVendor = true;