From f0734fe0ccc170183c095aa493fb5bf101baeaf8 Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Thu, 10 Apr 2025 21:17:01 +0530 Subject: [PATCH] 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. --- pkgs/by-name/co/cosmic-settings-daemon/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/co/cosmic-settings-daemon/package.nix b/pkgs/by-name/co/cosmic-settings-daemon/package.nix index 3cdddb2bbc1b..1b0f3cebb46b 100644 --- a/pkgs/by-name/co/cosmic-settings-daemon/package.nix +++ b/pkgs/by-name/co/cosmic-settings-daemon/package.nix @@ -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;