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