2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
2022-11-21 17:40:18 +00:00
|
|
|
, stdenvNoCC
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gdk-pixbuf
|
|
|
|
, gtk-engine-murrine
|
2022-11-21 17:40:18 +00:00
|
|
|
, jdupes
|
2022-06-16 17:23:12 +00:00
|
|
|
, librsvg
|
|
|
|
, gitUpdater
|
2022-11-21 17:40:18 +00:00
|
|
|
, colorVariants ? [] # default: all
|
|
|
|
, themeVariants ? [] # default: blue
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
let
|
2020-05-15 21:57:56 +00:00
|
|
|
pname = "matcha-gtk-theme";
|
2022-11-21 17:40:18 +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;
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "2023-04-03";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-04-12 12:48:02 +00:00
|
|
|
sha256 = "mr9X7p/H8H2QKZxAQC9j/8OLK4D3EnWLxriFlh16diE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
jdupes
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
buildInputs = [
|
|
|
|
gdk-pixbuf
|
|
|
|
librsvg
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedUserEnvPkgs = [
|
|
|
|
gtk-engine-murrine
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs install.sh
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook preInstall
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/share/themes
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
name= ./install.sh \
|
|
|
|
${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \
|
|
|
|
${lib.optionalString (themeVariants != []) "--theme " + builtins.toString themeVariants} \
|
|
|
|
--dest $out/share/themes
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/share/doc/${pname}
|
|
|
|
cp -a src/extra/firefox $out/share/doc/${pname}
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
jdupes --quiet --link-soft --recurse $out/share
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "A stylish flat Design theme for GTK based desktop environments";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://vinceliuice.github.io/theme-matcha";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|