Skip to content

Commit

Permalink
catppuccin-gtk: 0.7.5 -> 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Jun 10, 2024
1 parent 3369c12 commit f91c4d4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
, stdenvNoCC
, fetchFromGitHub
, gtk3
, git
, colloid-gtk-theme
, gnome-themes-extra
, gtk-engine-murrine
, python3
, sassc
, nix-update-script
Expand All @@ -20,45 +19,37 @@ let
validVariants = [ "latte" "frappe" "macchiato" "mocha" ];

pname = "catppuccin-gtk";
version = "1.0.3";
in

lib.checkListOfEnum "${pname}: theme accent" validAccents accents
lib.checkListOfEnum "${pname}: color variant" validVariants [variant]
lib.checkListOfEnum "${pname}: size variant" validSizes [size]
lib.checkListOfEnum "${pname}: tweaks" validTweaks tweaks

stdenvNoCC.mkDerivation rec {
inherit pname;
version = "0.7.5";
stdenvNoCC.mkDerivation {
inherit pname version;

src = fetchFromGitHub {
owner = "catppuccin";
repo = "gtk";
rev = "v${version}";
hash = "sha256-DIeMdkEjIcPIf/EgE83F5URHY+lR2+hxdc4wSrruFJ8=";
hash = "sha256-8KyZtZqVVz5UKuGdLrUsR2djD3nsJDliHMtvFtUVim8=";
};

nativeBuildInputs = [ gtk3 sassc ];

patches = [
./colloid-src-git-reset.patch
];

buildInputs = [
gnome-themes-extra
nativeBuildInputs = [
gtk3
sassc
# git is needed here since "git apply" is being used for patches
# see <https://github.com/catppuccin/gtk/blob/4173b70b910bbb3a42ef0e329b3e98d53cef3350/build.py#L465>
git
(python3.withPackages (ps: [ ps.catppuccin ]))
];

propagatedUserEnvPkgs = [ gtk-engine-murrine ];

postUnpack = ''
rm -rf source/colloid
cp -r ${colloid-gtk-theme.src} source/colloid
chmod -R +w source/colloid
'';

postPatch = ''
patchShebangs --build colloid/install.sh colloid/build.sh
rm -rf source/sources/colloid
cp -r ${colloid-gtk-theme.src} source/sources/colloid
chmod -R +w source/sources/colloid
'';

dontConfigure = true;
Expand All @@ -67,26 +58,24 @@ stdenvNoCC.mkDerivation rec {
installPhase = ''
runHook preInstall
cp -r colloid colloid-base
mkdir -p $out/share/themes
export HOME=$(mktemp -d)
python3 install.py ${variant} \
${lib.optionalString (accents != []) "--accent " + builtins.toString accents} \
${lib.optionalString (size != []) "--size " + size} \
${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} \
python3 build.py ${variant} \
--accent ${builtins.toString accents} \
${lib.optionalString (size != [ ]) "--size " + size} \
${lib.optionalString (tweaks != [ ]) "--tweaks " + builtins.toString tweaks} \
--dest $out/share/themes
runHook postInstall
'';

passthru.updateScript = nix-update-script { };

meta = with lib; {
meta = {
description = "Soothing pastel theme for GTK";
homepage = "https://github.com/catppuccin/gtk";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ fufexan dixslyf ];
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ fufexan dixslyf isabelroses ];
};
}
17 changes: 0 additions & 17 deletions pkgs/data/themes/catppuccin-gtk/colloid-src-git-reset.patch

This file was deleted.

2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,6 @@ with pkgs;

catatonit = callPackage ../applications/virtualization/catatonit { };

catppuccin-gtk = callPackage ../data/themes/catppuccin-gtk { };

catppuccin-kde = callPackage ../data/themes/catppuccin-kde { };

catppuccin-kvantum = callPackage ../data/themes/catppuccin-kvantum { };
Expand Down

0 comments on commit f91c4d4

Please sign in to comment.