2022-06-14 21:30:18 +01:00
|
|
|
{ lib
|
2022-11-16 00:52:55 +00:00
|
|
|
, stdenvNoCC
|
2022-06-14 21:30:18 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gdk-pixbuf
|
|
|
|
, gtk-engine-murrine
|
2022-11-16 00:52:55 +00:00
|
|
|
, jdupes
|
2022-06-14 21:30:18 +01:00
|
|
|
, librsvg
|
|
|
|
, gitUpdater
|
2022-11-16 00:52:55 +00:00
|
|
|
, colorVariants ? [] # default: all
|
|
|
|
, themeVariants ? [] # default: blue
|
2022-06-14 21:30:18 +01:00
|
|
|
}:
|
2018-09-15 15:50:24 +01:00
|
|
|
|
2022-11-16 00:52:55 +00:00
|
|
|
let
|
2020-05-09 11:28:28 +01:00
|
|
|
pname = "matcha-gtk-theme";
|
2022-11-16 00:52:55 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants
|
|
|
|
lib.checkListOfEnum "${pname}: theme variants" [ "aliz" "azul" "sea" "pueril" "all" ] themeVariants
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
inherit pname;
|
|
|
|
version = "2022-11-15";
|
2018-09-15 15:50:24 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
2019-09-08 21:22:41 +01:00
|
|
|
repo = pname;
|
2019-09-30 11:00:09 +01:00
|
|
|
rev = version;
|
2022-11-16 00:52:55 +00:00
|
|
|
sha256 = "Rx22O8C7kbYADxqJF8u6kdcQnXNA5aS+NWOnx/X4urY=";
|
2018-09-15 15:50:24 +01:00
|
|
|
};
|
|
|
|
|
2022-11-16 00:52:55 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
jdupes
|
|
|
|
];
|
|
|
|
|
2022-06-14 21:30:18 +01:00
|
|
|
buildInputs = [
|
|
|
|
gdk-pixbuf
|
|
|
|
librsvg
|
|
|
|
];
|
2018-09-15 15:50:24 +01:00
|
|
|
|
2022-06-14 21:30:18 +01:00
|
|
|
propagatedUserEnvPkgs = [
|
|
|
|
gtk-engine-murrine
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs install.sh
|
|
|
|
'';
|
2018-09-15 15:50:24 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-04-05 13:59:51 +01:00
|
|
|
runHook preInstall
|
2022-11-16 00:52:55 +00:00
|
|
|
|
2018-12-24 20:04:05 +00:00
|
|
|
mkdir -p $out/share/themes
|
2022-11-16 00:52:55 +00:00
|
|
|
|
|
|
|
name= ./install.sh \
|
|
|
|
${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \
|
|
|
|
${lib.optionalString (themeVariants != []) "--theme " + builtins.toString themeVariants} \
|
|
|
|
--dest $out/share/themes
|
|
|
|
|
2020-02-27 18:50:44 +00:00
|
|
|
mkdir -p $out/share/doc/${pname}
|
|
|
|
cp -a src/extra/firefox $out/share/doc/${pname}
|
2022-11-16 00:52:55 +00:00
|
|
|
|
|
|
|
jdupes --quiet --link-soft --recurse $out/share
|
|
|
|
|
2021-04-05 13:59:51 +01:00
|
|
|
runHook postInstall
|
2018-09-15 15:50:24 +01:00
|
|
|
'';
|
|
|
|
|
2022-09-27 22:12:05 +01:00
|
|
|
passthru.updateScript = gitUpdater { };
|
2022-06-14 21:30:18 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-06-14 21:30:18 +01:00
|
|
|
description = "A stylish flat Design theme for GTK based desktop environments";
|
2020-02-06 15:56:24 +00:00
|
|
|
homepage = "https://vinceliuice.github.io/theme-matcha";
|
2021-01-12 17:29:03 +00:00
|
|
|
license = licenses.gpl3Only;
|
2018-09-15 15:50:24 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|