From 2b0e7e5724a023cd5ae083766524e9e0d0c6e146 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Tue, 2 Aug 2022 20:39:51 +0300 Subject: [PATCH] catppuccin-gtk: unstable-2022-02-24 -> unstable-2022-08-01 --- pkgs/data/themes/catppuccin-gtk/default.nix | 36 ++++++++----------- .../data/themes/catppuccin-gtk/grey-fix.patch | 12 ------- 2 files changed, 14 insertions(+), 34 deletions(-) delete mode 100644 pkgs/data/themes/catppuccin-gtk/grey-fix.patch diff --git a/pkgs/data/themes/catppuccin-gtk/default.nix b/pkgs/data/themes/catppuccin-gtk/default.nix index ec8c93100240..b9bc042dd09c 100644 --- a/pkgs/data/themes/catppuccin-gtk/default.nix +++ b/pkgs/data/themes/catppuccin-gtk/default.nix @@ -6,22 +6,22 @@ , gtk-engine-murrine , sassc , which -, tweaks ? [ ] # can be "nord" "black" "rimless". cannot mix "nord" and "black" -, size ? "standard" # can be "standard" "compact" +, tweaks ? [ ] +, size ? "standard" }: let validSizes = [ "standard" "compact" ]; - validTweaks = [ "nord" "black" "rimless" ]; + validTweaks = [ "nord" "dracula" "black" "rimless" "normal" ]; unknownTweaks = lib.subtractLists validTweaks tweaks; - illegalMix = !(lib.elem "nord" tweaks) && !(lib.elem "black" tweaks); + illegalMix = !(lib.elem "nord" tweaks) && !(lib.elem "dracula" tweaks); assertIllegal = lib.assertMsg illegalMix '' - Tweaks "nord" and "black" cannot be mixed. Tweaks: ${toString tweaks} + Tweaks "nord" and "dracula" cannot be mixed. Tweaks: ${toString tweaks} ''; assertSize = lib.assertMsg (lib.elem size validSizes) '' - You entered wrong size: ${size} + You entered a wrong size: ${size} Valid sizes are: ${toString validSizes} ''; @@ -37,13 +37,13 @@ assert assertUnknown; stdenvNoCC.mkDerivation rec { pname = "catppuccin-gtk"; - version = "unstable-2022-02-24"; + version = "unstable-2022-08-01"; src = fetchFromGitHub { repo = "gtk"; owner = "catppuccin"; - rev = "359c584f607c021fcc657ce77b81c181ebaff6de"; - sha256 = "sha256-AVhFw1XTnkU0hoM+UyjT7ZevLkePybBATJUMLqRytpk="; + rev = "87a79fd2bf07accc694455df30a32a82b1b31f4f"; + sha256 = "sha256-dKHTQva0BYkO6VPNfY/pzRn/V1ghX+tYqbnM9hTAMeE="; }; nativeBuildInputs = [ gtk3 sassc which ]; @@ -52,25 +52,17 @@ stdenvNoCC.mkDerivation rec { propagatedUserEnvPkgs = [ gtk-engine-murrine ]; - patches = [ - # Allows installing with `-t all`. Works around missing grey assets. - # https://github.com/catppuccin/gtk/issues/17 - ./grey-fix.patch - ]; - postPatch = '' - patchShebangs --build scripts/* - substituteInPlace Makefile \ - --replace '$(shell git rev-parse --show-toplevel)' "$PWD" - substituteInPlace 'scripts/install.sh' \ - --replace '$(git rev-parse --show-toplevel)' "$PWD" + patchShebangs --build clean-old-theme.sh install.sh ''; installPhase = '' runHook preInstall + export HOME=$(mktemp -d) + mkdir -p $out/share/themes - bash scripts/install.sh -d $out/share/themes -t all \ + bash install.sh -d $out/share/themes -t all \ ${lib.optionalString (size != "") "-s ${size}"} \ ${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} @@ -78,7 +70,7 @@ stdenvNoCC.mkDerivation rec { ''; meta = with lib; { - description = "Soothing pastel theme for GTK3"; + description = "Soothing pastel theme for GTK"; homepage = "https://github.com/catppuccin/gtk"; license = licenses.gpl3Plus; platforms = platforms.linux; diff --git a/pkgs/data/themes/catppuccin-gtk/grey-fix.patch b/pkgs/data/themes/catppuccin-gtk/grey-fix.patch deleted file mode 100644 index 73f7d8fa65d3..000000000000 --- a/pkgs/data/themes/catppuccin-gtk/grey-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/scripts/install.sh b/scripts/install.sh -index d2a2b86..bd05c93 100755 ---- a/scripts/install.sh -+++ b/scripts/install.sh -@@ -20,7 +20,7 @@ fi - SASSC_OPT="-M -t expanded" - - THEME_NAME=Catppuccin --THEME_VARIANTS=('' '-purple' '-pink' '-red' '-orange' '-yellow' '-green' '-teal' '-grey') -+THEME_VARIANTS=('' '-purple' '-pink' '-red' '-orange' '-yellow' '-green' '-teal') - COLOR_VARIANTS=('' '-light' '-dark') - SIZE_VARIANTS=('' '-compact')