2021-08-09 15:52:48 +00:00
|
|
|
{ lib
|
2022-11-10 00:57:19 +00:00
|
|
|
, stdenvNoCC
|
2021-08-09 15:52:48 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gnome-shell
|
|
|
|
, gtk-engine-murrine
|
|
|
|
, gtk_engines
|
2022-11-10 00:57:19 +00:00
|
|
|
, jdupes
|
2022-04-24 15:02:31 +00:00
|
|
|
, sassc
|
|
|
|
, gitUpdater
|
2022-11-10 00:57:19 +00:00
|
|
|
, themeVariants ? [] # default: doder (blue)
|
|
|
|
, colorVariants ? [] # default: all
|
|
|
|
, sizeVariants ? [] # default: standard
|
|
|
|
, tweaks ? []
|
2021-08-09 15:52:48 +00:00
|
|
|
}:
|
2020-02-24 15:51:12 +00:00
|
|
|
|
2022-11-10 00:57:19 +00:00
|
|
|
let
|
2020-02-24 15:51:12 +00:00
|
|
|
pname = "vimix-gtk-themes";
|
2022-11-10 00:57:19 +00:00
|
|
|
|
|
|
|
in
|
2023-01-27 00:57:12 +00:00
|
|
|
lib.checkListOfEnum "${pname}: theme variants" [ "doder" "beryl" "ruby" "amethyst" "jade" "grey" "all" ] themeVariants
|
2022-11-10 00:57:19 +00:00
|
|
|
lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants
|
2023-01-27 00:57:12 +00:00
|
|
|
lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" "all" ] sizeVariants
|
2022-11-10 00:57:19 +00:00
|
|
|
lib.checkListOfEnum "${pname}: tweaks" [ "flat" "grey" "mix" "translucent" ] tweaks
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
inherit pname;
|
2023-09-21 22:59:38 +00:00
|
|
|
version = "2023-09-09";
|
2020-02-24 15:51:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-09-21 22:59:38 +00:00
|
|
|
sha256 = "dfdPEJnSmD0eqzx4ysiGPp77Beo32l2Tz1qSrbShLlc=";
|
2020-02-24 15:51:12 +00:00
|
|
|
};
|
|
|
|
|
2021-08-09 15:52:48 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gnome-shell # needed to determine the gnome-shell version
|
2022-11-10 00:57:19 +00:00
|
|
|
jdupes
|
2022-04-24 15:02:31 +00:00
|
|
|
sassc
|
2021-08-09 15:52:48 +00:00
|
|
|
];
|
2020-02-24 15:51:12 +00:00
|
|
|
|
2021-08-09 15:52:48 +00:00
|
|
|
buildInputs = [
|
|
|
|
gtk_engines
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedUserEnvPkgs = [
|
|
|
|
gtk-engine-murrine
|
|
|
|
];
|
2020-02-24 15:51:12 +00:00
|
|
|
|
2022-04-24 15:02:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs install.sh
|
|
|
|
'';
|
|
|
|
|
2020-02-24 15:51:12 +00:00
|
|
|
installPhase = ''
|
2021-06-06 23:02:47 +00:00
|
|
|
runHook preInstall
|
2020-02-24 15:51:12 +00:00
|
|
|
mkdir -p $out/share/themes
|
2022-11-10 00:57:19 +00:00
|
|
|
name= HOME="$TMPDIR" ./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
|
2020-02-24 15:51:12 +00:00
|
|
|
rm $out/share/themes/*/{AUTHORS,LICENSE}
|
2022-11-10 00:57:19 +00:00
|
|
|
jdupes --quiet --link-soft --recurse $out/share
|
2021-06-06 23:02:47 +00:00
|
|
|
runHook postInstall
|
2020-02-24 15:51:12 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-27 21:12:05 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
2022-04-24 15:02:31 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-02-24 15:51:12 +00:00
|
|
|
description = "Flat Material Design theme for GTK based desktop environments";
|
|
|
|
homepage = "https://github.com/vinceliuice/vimix-gtk-themes";
|
2021-06-06 23:02:47 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-02-24 15:51:12 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|