nixos-configs/scopedPackages/dracula/gtk.nix
matt1432 6b097eb53f
All checks were successful
Discord / discord commits (push) Has been skipped
fix(cursor): get rid of gtk4 warning and refactor
2025-01-05 22:19:36 -05:00

44 lines
945 B
Nix

{
gtk-theme-src,
pkgs,
...
}:
pkgs.dracula-theme.overrideAttrs (o: {
version = o.version + "+" + gtk-theme-src.shortRev;
src = gtk-theme-src;
# Generate hyprcursor theme
buildInputs =
(o.buildInputs or [])
++ (builtins.attrValues {
inherit
(pkgs)
hyprcursor
xcur2png
;
});
preInstall = ''
${o.preInstall or ""}
mkdir -p $out/share/icons/Dracula-cursors
cd ./kde/cursors
hyprcursor-util --extract ./Dracula-cursors
# this creates a symlink to 'theme_Extracted Theme' for some reason
hyprcursor-util --create ./extracted_Dracula-cursors
mv 'theme_Extracted Theme' ./extracted
cat <<EOF > ./extracted/manifest.hl
name = Dracula-cursors
description = Automatically extracted with hyprcursor-util
version = 0.1
cursors_directory = hyprcursors
EOF
mv ./extracted/* $out/share/icons/Dracula-cursors/
cd ../..
'';
})