3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/data/themes/matcha/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
, stdenvNoCC
, fetchFromGitHub
, gdk-pixbuf
, gtk-engine-murrine
, jdupes
, librsvg
, gitUpdater
, colorVariants ? [] # default: all
, themeVariants ? [] # default: blue
}:
2018-09-15 15:50:24 +01:00
let
pname = "matcha-gtk-theme";
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;
sha256 = "Rx22O8C7kbYADxqJF8u6kdcQnXNA5aS+NWOnx/X4urY=";
2018-09-15 15:50:24 +01:00
};
nativeBuildInputs = [
jdupes
];
buildInputs = [
gdk-pixbuf
librsvg
];
2018-09-15 15:50:24 +01:00
propagatedUserEnvPkgs = [
gtk-engine-murrine
];
postPatch = ''
patchShebangs install.sh
'';
2018-09-15 15:50:24 +01:00
installPhase = ''
runHook preInstall
2018-12-24 20:04:05 +00:00
mkdir -p $out/share/themes
name= ./install.sh \
${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \
${lib.optionalString (themeVariants != []) "--theme " + builtins.toString themeVariants} \
--dest $out/share/themes
mkdir -p $out/share/doc/${pname}
cp -a src/extra/firefox $out/share/doc/${pname}
jdupes --quiet --link-soft --recurse $out/share
runHook postInstall
2018-09-15 15:50:24 +01:00
'';
passthru.updateScript = gitUpdater { };
meta = with lib; {
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";
license = licenses.gpl3Only;
2018-09-15 15:50:24 +01:00
platforms = platforms.unix;
maintainers = [ maintainers.romildo ];
};
}