From 7875cddddd88c696039bf94b7c1e398a471f8d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 15 Jul 2025 20:12:18 -0300 Subject: [PATCH] graphite-gtk-theme: fix wallpaper installation --- pkgs/by-name/gr/graphite-gtk-theme/package.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/gr/graphite-gtk-theme/package.nix b/pkgs/by-name/gr/graphite-gtk-theme/package.nix index f6abb8cb8768..0208957a2e4f 100644 --- a/pkgs/by-name/gr/graphite-gtk-theme/package.nix +++ b/pkgs/by-name/gr/graphite-gtk-theme/package.nix @@ -84,11 +84,17 @@ lib.checkListOfEnum "${pname}: theme variants" gtk-engine-murrine ]; + postPatch = '' + patchShebangs install.sh wallpaper/install-wallpapers.sh + + substituteInPlace wallpaper/install-wallpapers.sh \ + --replace-fail /usr/share $out/share \ + --replace-fail '[[ "$UID" -eq "$ROOT_UID" ]]' true + ''; + installPhase = '' runHook preInstall - patchShebangs install.sh - name= ./install.sh \ ${lib.optionalString (themeVariants != [ ]) "--theme " + builtins.toString themeVariants} \ ${lib.optionalString (colorVariants != [ ]) "--color " + builtins.toString colorVariants} \ @@ -96,13 +102,7 @@ lib.checkListOfEnum "${pname}: theme variants" ${lib.optionalString (tweaks != [ ]) "--tweaks " + builtins.toString tweaks} \ --dest $out/share/themes - ${lib.optionalString wallpapers '' - mkdir -p $out/share/backgrounds - cp -a wallpaper/Graphite/*.png $out/share/backgrounds/ - ${lib.optionalString (builtins.elem "nord" tweaks) '' - cp -a wallpaper/Graphite-nord/*.png $out/share/backgrounds/ - ''} - ''} + ${lib.optionalString wallpapers "sh -x wallpaper/install-wallpapers.sh"} ${lib.optionalString withGrub '' (