Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-24.05] catppuccin-cursors: 0.2.0 -> 0.3.0 #321759

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, unzip
, inkscape
, just
, xcursorgen
, hyprcursor
}:

let
dimensions = {
palette = [ "Frappe" "Latte" "Macchiato" "Mocha" ];
palette = [ "frappe" "latte" "macchiato" "mocha" ];
color = [ "Blue" "Dark" "Flamingo" "Green" "Lavender" "Light" "Maroon" "Mauve" "Peach" "Pink" "Red" "Rosewater" "Sapphire" "Sky" "Teal" "Yellow" ];
};
variantName = { palette, color }: (lib.strings.toLower palette) + color;
variantName = { palette, color }: palette + color;
variants = lib.mapCartesianProduct variantName dimensions;
version = "0.3.0";
in
stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation {
pname = "catppuccin-cursors";
version = "0.2.0";
dontBuild = true;
inherit version;

src = fetchFromGitHub {
owner = "catppuccin";
repo = "cursors";
rev = "v${version}";
sha256 = "sha256-TgV5f8+YWR+h61m6WiBMg3aBFnhqShocZBdzZHSyU2c=";
sparseCheckout = [ "cursors" ];
hash = "sha256-LJyBnXDUGBLOD4qPI7l0YC0CcqYTtgoMJc1H2yLqk9g=";
};

nativeBuildInputs = [ unzip ];
nativeBuildInputs = [ just inkscape xcursorgen hyprcursor ];

outputs = variants ++ [ "out" ]; # dummy "out" output to prevent breakage

outputsToInstall = [];

buildPhase = ''
runHook preBuild

patchShebangs .

just all_with_hyprcursor

runHook postBuild
'';

installPhase = ''
runHook preInstall

Expand All @@ -43,9 +55,9 @@ stdenvNoCC.mkDerivation rec {

# Convert to kebab case with the first letter of each word capitalized
local variant=$(sed 's/\([A-Z]\)/-\1/g' <<< "$output")
local variant=''${variant^}
local variant=''${variant,,}

unzip "cursors/Catppuccin-$variant-Cursors.zip" -d "$iconsDir"
mv "dist/catppuccin-$variant-cursors" "$iconsDir"
fi
done

Expand All @@ -55,11 +67,11 @@ stdenvNoCC.mkDerivation rec {
runHook postInstall
'';

meta = with lib; {
meta = {
description = "Catppuccin cursor theme based on Volantes";
homepage = "https://github.com/catppuccin/cursors";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ dixslyf ];
license = lib.licenses.gpl2;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ dixslyf ];
};
}
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28327,8 +28327,6 @@ with pkgs;

cascadia-code = callPackage ../data/fonts/cascadia-code { };

catppuccin-cursors = callPackage ../data/icons/catppuccin-cursors { };

ccsymbols = callPackage ../data/fonts/ccsymbols { };

charis-sil = callPackage ../data/fonts/charis-sil { };
Expand Down