From 67799e1347f692deaf6a5009bbb19af05c2799d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 13 Jun 2023 12:13:35 -0300 Subject: [PATCH] mojave-gtk-theme: update wallpapers --- pkgs/data/themes/mojave/default.nix | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/pkgs/data/themes/mojave/default.nix b/pkgs/data/themes/mojave/default.nix index a301581bedff..a39790686253 100644 --- a/pkgs/data/themes/mojave/default.nix +++ b/pkgs/data/themes/mojave/default.nix @@ -43,9 +43,12 @@ stdenvNoCC.mkDerivation rec { ] ++ lib.optional wallpapers - (fetchurl { - url = "https://github.com/vinceliuice/Mojave-gtk-theme/raw/11741a99d96953daf9c27e44c94ae50a7247c0ed/macOS_Mojave_Wallpapers.tar.xz"; - sha256 = "18zzkwm1kqzsdaj8swf0xby1n65gxnyslpw4lnxcx1rphip0rwf7"; + (fetchFromGitHub { + owner = "vinceliuice"; + repo = pname; + rev = "0c4ae6ddff7e3fab4959469461c4d4042deb1b2f"; + hash = "sha256-7LSZSsRt6zTVPLWzuBgwRC1q1MHp5pN/pMl3x2wR8Ow="; + name = "wallpapers"; }) ; @@ -97,6 +100,12 @@ stdenvNoCC.mkDerivation rec { --replace /usr/bin/inkscape ${inkscape}/bin/inkscape \ --replace /usr/bin/optipng ${optipng}/bin/optipng done + + ${lib.optionalString wallpapers '' + for f in ../wallpapers/Mojave{,-timed}.xml; do + substituteInPlace $f --replace /usr $out + done + ''} ''; installPhase = '' @@ -111,7 +120,11 @@ stdenvNoCC.mkDerivation rec { --dest $out/share/themes ${lib.optionalString wallpapers '' - install -D -t $out/share/wallpapers ../"macOS Mojave Wallpapers"/* + mkdir -p $out/share/backgrounds/Mojave + mkdir -p $out/share/gnome-background-properties + cp -a ../wallpapers/Mojave*.jpeg $out/share/backgrounds/Mojave/ + cp -a ../wallpapers/Mojave-timed.xml $out/share/backgrounds/Mojave/ + cp -a ../wallpapers/Mojave.xml $out/share/gnome-background-properties/ ''} # Replace duplicate files with soft links to the first file in each