nixos/pkgs/gruvbox-material-gtk.nix

51 lines
1.3 KiB
Nix
Raw Normal View History

{
lib,
stdenv,
fetchFromGitHub,
2022-05-06 22:59:56 +02:00
gtk3,
breeze-icons,
hicolor-icon-theme,
hiDPI ? false,
}: let
2022-05-06 22:59:56 +02:00
name = "gruvbox-material-gtk";
rev = "cc255d43322ad646bb35924accb0778d5e959626";
sha256 = "1O34p9iZelqRFBloOSZkxV0Z/7Jffciptpj3fwXPHbc=";
2021-05-30 20:47:58 +02:00
variant =
if hiDPI
then "Gruvbox-Material-Dark-HIDPI"
else "Gruvbox-Material-Dark";
in
2022-05-06 22:59:56 +02:00
stdenv.mkDerivation {
pname = name;
version = rev;
2021-05-30 20:47:58 +02:00
src = fetchFromGitHub {
2022-05-06 22:59:56 +02:00
inherit rev sha256;
owner = "TheGreatMcPain";
repo = name;
};
2021-05-30 20:47:58 +02:00
2022-05-06 22:59:56 +02:00
nativeBuildInputs = [gtk3];
propagatedBuildInputs = [breeze-icons hicolor-icon-theme];
installPhase = ''
2022-05-06 22:59:56 +02:00
rm -rf README.md LICENSE demo.png
mkdir -p $out/share/themes/Gruvbox-Material-Dark
cp -r themes/${variant}/* $out/share/themes/Gruvbox-Material-Dark
mkdir -p $out/share/icons/Gruvbox-Material-Dark
cp -r icons/Gruvbox-Material-Dark/* $out/share/icons/Gruvbox-Material-Dark
gtk-update-icon-cache $out/share/icons/Gruvbox-Material-Dark
'';
2021-05-30 20:47:58 +02:00
2022-05-06 22:59:56 +02:00
dontDropIconThemeCache = true;
meta = with lib; {
description = "Gruvbox Material for GTK";
2022-05-06 22:59:56 +02:00
homepage = "https://github.com/TheGreatMcPain/gruvbox-material-gtk";
license = licenses.mit;
platforms = platforms.unix;
maintainers = [];
};
}