Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
112 lines
2.1 KiB
Nix
112 lines
2.1 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchFromGitHub,
|
|
inkscape,
|
|
just,
|
|
xcursorgen,
|
|
hyprcursor,
|
|
xcur2png,
|
|
catppuccin-whiskers,
|
|
python3,
|
|
python3Packages,
|
|
}:
|
|
let
|
|
dimensions = {
|
|
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 }: palette + color;
|
|
variants = lib.mapCartesianProduct variantName dimensions;
|
|
version = "1.0.1";
|
|
in
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "catppuccin-cursors";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "catppuccin";
|
|
repo = "cursors";
|
|
rev = "v${version}";
|
|
hash = "sha256-l01L0UiE9bgUOMHhs74Bndarw2b6TaJGW/xU/8rfoAk=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
just
|
|
inkscape
|
|
xcursorgen
|
|
hyprcursor
|
|
xcur2png
|
|
catppuccin-whiskers
|
|
python3
|
|
python3Packages.pyside6
|
|
];
|
|
|
|
outputs = variants ++ [ "out" ]; # dummy "out" output to prevent breakage
|
|
|
|
outputsToInstall = [ ];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
patchShebangs .
|
|
|
|
just all_with_hyprcursor
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
for output in $(getAllOutputNames); do
|
|
if [ "$output" != "out" ]; then
|
|
local outputDir="''${!output}"
|
|
local iconsDir="$outputDir"/share/icons
|
|
|
|
mkdir -p "$iconsDir"
|
|
|
|
# Convert to kebab case with the first letter of each word capitalized
|
|
local variant=$(sed 's/\([A-Z]\)/-\1/g' <<< "$output")
|
|
local variant=''${variant,,}
|
|
|
|
mv "dist/catppuccin-$variant-cursors" "$iconsDir"
|
|
fi
|
|
done
|
|
|
|
# Needed to prevent breakage
|
|
mkdir -p "$out"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Catppuccin cursor theme based on Volantes";
|
|
homepage = "https://github.com/catppuccin/cursors";
|
|
license = lib.licenses.gpl2;
|
|
platforms = lib.platforms.linux;
|
|
maintainers = with lib.maintainers; [ dixslyf ];
|
|
};
|
|
}
|