2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, gitUpdater
|
2022-01-13 20:06:32 +00:00
|
|
|
, gnome-themes-extra
|
|
|
|
, gtk-engine-murrine
|
|
|
|
, jdupes
|
|
|
|
, sassc
|
|
|
|
, themeVariants ? [] # default: blue
|
|
|
|
, colorVariants ? [] # default: all
|
|
|
|
, sizeVariants ? [] # default: standard
|
|
|
|
, tweaks ? []
|
|
|
|
, wallpapers ? false
|
2022-02-10 20:34:41 +00:00
|
|
|
, withGrub ? false
|
|
|
|
, grubScreens ? [] # default: 1080p
|
2022-01-13 20:06:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "graphite-gtk-theme";
|
|
|
|
|
|
|
|
in
|
2022-01-19 23:45:15 +00:00
|
|
|
lib.checkListOfEnum "${pname}: theme variants" [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "blue" "all" ] themeVariants
|
|
|
|
lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants
|
|
|
|
lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" ] sizeVariants
|
2022-03-30 09:31:56 +00:00
|
|
|
lib.checkListOfEnum "${pname}: tweaks" [ "nord" "black" "dark" "rimless" "normal" ] tweaks
|
2022-02-10 20:34:41 +00:00
|
|
|
lib.checkListOfEnum "${pname}: grub screens" [ "1080p" "2k" "4k" ] grubScreens
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2022-01-13 20:06:32 +00:00
|
|
|
inherit pname;
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "2022-09-02";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
|
|
|
repo = pname;
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "PaqEkl0E3pUEJDEv1WwUqcjzAcQniN8rUGhVgbOxuhA=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
jdupes
|
|
|
|
sassc
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gnome-themes-extra
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedUserEnvPkgs = [
|
|
|
|
gtk-engine-murrine
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
patchShebangs install.sh
|
|
|
|
|
|
|
|
name= ./install.sh \
|
|
|
|
${lib.optionalString (themeVariants != []) "--theme " + builtins.toString themeVariants} \
|
|
|
|
${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \
|
|
|
|
${lib.optionalString (sizeVariants != []) "--size " + builtins.toString sizeVariants} \
|
|
|
|
${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} \
|
|
|
|
--dest $out/share/themes
|
|
|
|
|
|
|
|
${lib.optionalString wallpapers ''
|
|
|
|
mkdir -p $out/share/backgrounds
|
|
|
|
cp -a wallpaper/Graphite-normal/*.png $out/share/backgrounds/
|
|
|
|
${lib.optionalString (builtins.elem "nord" tweaks) ''
|
|
|
|
cp -a wallpaper/Graphite-nord/*.png $out/share/backgrounds/
|
|
|
|
''}
|
|
|
|
''}
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
${lib.optionalString withGrub ''
|
|
|
|
(
|
|
|
|
cd other/grub2
|
|
|
|
|
|
|
|
patchShebangs install.sh
|
|
|
|
|
|
|
|
./install.sh --justcopy --dest $out/share/grub/themes \
|
|
|
|
${lib.optionalString (builtins.elem "nord" tweaks) "--theme nord"} \
|
|
|
|
${lib.optionalString (grubScreens != []) "--screen " + builtins.toString grubScreens}
|
|
|
|
)
|
|
|
|
''}
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
jdupes --quiet --link-soft --recurse $out/share
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Flat Gtk+ theme based on Elegant Design";
|
|
|
|
homepage = "https://github.com/vinceliuice/Graphite-gtk-theme";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|