2024-06-30 01:25:07 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenvNoCC,
|
|
|
|
fetchFromGitHub,
|
2024-08-28 21:56:05 +00:00
|
|
|
gnome-shell,
|
2024-06-30 01:25:07 +00:00
|
|
|
sassc,
|
|
|
|
gnome-themes-extra,
|
|
|
|
gtk-engine-murrine,
|
2024-07-12 23:08:31 +00:00
|
|
|
unstableGitUpdater,
|
|
|
|
colorVariants ? [ ],
|
|
|
|
sizeVariants ? [ ],
|
|
|
|
themeVariants ? [ ],
|
|
|
|
tweakVariants ? [ ],
|
|
|
|
iconVariants ? [ ],
|
2024-06-30 01:25:07 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "tokyonight-gtk-theme";
|
|
|
|
colorVariantList = [
|
|
|
|
"dark"
|
|
|
|
"light"
|
|
|
|
];
|
2024-07-12 23:08:31 +00:00
|
|
|
sizeVariantList = [
|
|
|
|
"compact"
|
|
|
|
"standard"
|
|
|
|
];
|
|
|
|
themeVariantList = [
|
|
|
|
"default"
|
|
|
|
"green"
|
|
|
|
"grey"
|
|
|
|
"orange"
|
|
|
|
"pink"
|
|
|
|
"purple"
|
|
|
|
"red"
|
|
|
|
"teal"
|
|
|
|
"yellow"
|
|
|
|
"all"
|
|
|
|
];
|
|
|
|
tweakVariantList = [
|
|
|
|
"moon"
|
|
|
|
"storm"
|
|
|
|
"black"
|
|
|
|
"float"
|
|
|
|
"outline"
|
|
|
|
"macos"
|
|
|
|
];
|
|
|
|
iconVariantList = [
|
|
|
|
"Dark-Cyan"
|
|
|
|
"Dark"
|
|
|
|
"Light"
|
|
|
|
"Moon"
|
|
|
|
];
|
2024-06-30 01:25:07 +00:00
|
|
|
in
|
2024-07-12 23:08:31 +00:00
|
|
|
lib.checkListOfEnum "${pname}: colorVariants" colorVariantList colorVariants lib.checkListOfEnum
|
|
|
|
"${pname}: sizeVariants"
|
|
|
|
sizeVariantList
|
|
|
|
sizeVariants
|
|
|
|
lib.checkListOfEnum
|
|
|
|
"${pname}: themeVariants"
|
|
|
|
themeVariantList
|
|
|
|
themeVariants
|
|
|
|
lib.checkListOfEnum
|
|
|
|
"${pname}: tweakVariants"
|
|
|
|
tweakVariantList
|
|
|
|
tweakVariants
|
|
|
|
lib.checkListOfEnum
|
|
|
|
"${pname}: iconVariants"
|
|
|
|
iconVariantList
|
|
|
|
iconVariants
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation
|
|
|
|
{
|
|
|
|
inherit pname;
|
|
|
|
version = "0-unstable-2024-07-22";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Fausto-Korpsvart";
|
|
|
|
repo = "Tokyonight-GTK-Theme";
|
|
|
|
rev = "a9a25010e9fbfca783c3c27258dbad76a9cc7842";
|
|
|
|
hash = "sha256-HbrDDiMej4DjvskGItele/iCUY1NzlWlu3ZneA76feM=";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-08-28 21:56:05 +00:00
|
|
|
gnome-shell
|
2024-07-12 23:08:31 +00:00
|
|
|
sassc
|
|
|
|
];
|
|
|
|
buildInputs = [ gnome-themes-extra ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs themes/install.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share/themes
|
|
|
|
cd themes
|
|
|
|
./install.sh -n Tokyonight \
|
|
|
|
${lib.optionalString (colorVariants != [ ]) "-c " + toString colorVariants} \
|
|
|
|
${lib.optionalString (sizeVariants != [ ]) "-s " + toString sizeVariants} \
|
|
|
|
${lib.optionalString (themeVariants != [ ]) "-t " + toString themeVariants} \
|
|
|
|
${lib.optionalString (tweakVariants != [ ]) "--tweaks " + toString tweakVariants} \
|
|
|
|
-d "$out/share/themes"
|
|
|
|
cd ../icons
|
|
|
|
${lib.optionalString (iconVariants != [ ]) ''
|
|
|
|
mkdir -p $out/share/icons
|
|
|
|
cp -a ${toString (map (v: "Tokyonight-${v}") iconVariants)} $out/share/icons/
|
|
|
|
''}
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "GTK theme based on the Tokyo Night colour palette";
|
|
|
|
homepage = "https://github.com/Fausto-Korpsvart/Tokyonight-GTK-Theme";
|
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
garaiza-93
|
|
|
|
Madouura
|
|
|
|
d3vil0p3r
|
|
|
|
];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|