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