mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
catppuccin-gtk: 0.7.5 -> 1.0.3
This commit is contained in:
parent
3369c12187
commit
f91c4d43ea
@ -2,9 +2,8 @@
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
, gtk3
|
||||
, git
|
||||
, colloid-gtk-theme
|
||||
, gnome-themes-extra
|
||||
, gtk-engine-murrine
|
||||
, python3
|
||||
, sassc
|
||||
, nix-update-script
|
||||
@ -20,6 +19,7 @@ let
|
||||
validVariants = [ "latte" "frappe" "macchiato" "mocha" ];
|
||||
|
||||
pname = "catppuccin-gtk";
|
||||
version = "1.0.3";
|
||||
in
|
||||
|
||||
lib.checkListOfEnum "${pname}: theme accent" validAccents accents
|
||||
@ -27,38 +27,29 @@ 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;
|
||||
@ -67,14 +58,12 @@ 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
|
||||
@ -82,11 +71,11 @@ stdenvNoCC.mkDerivation rec {
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
diff --git a/scripts/create_theme.py b/scripts/create_theme.py
|
||||
index 074dc43..7e7a8eb 100644
|
||||
--- a/scripts/create_theme.py
|
||||
+++ b/scripts/create_theme.py
|
||||
@@ -34,7 +34,11 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F
|
||||
os.chdir(work_dir)
|
||||
subprocess.call("./build.sh", shell=True) # Rebuild all scss
|
||||
subprocess.call(install_cmd, shell=True) # Install the theme globally for you
|
||||
- subprocess.call("git reset --hard HEAD", shell=True) # reset colloid repo to original state
|
||||
+ # subprocess.call("git reset --hard HEAD", shell=True) # reset colloid repo to original state
|
||||
+ # recreate git reset
|
||||
+ os.chdir(repo_dir)
|
||||
+ shutil.rmtree("colloid")
|
||||
+ shutil.copytree("colloid-base", "colloid")
|
||||
|
||||
try:
|
||||
# Rename colloid generated files as per catppuccin
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user