vimix-icon-theme: allow selection of color variants

This commit is contained in:
José Romildo 2022-02-11 23:33:06 -03:00
parent 5f5ff6fe12
commit 6cdad97e74

View file

@ -1,7 +1,20 @@
{ lib, stdenv, fetchFromGitHub, gtk3, hicolor-icon-theme, jdupes }:
{ lib
, stdenv
, fetchFromGitHub
, gtk3
, hicolor-icon-theme
, jdupes
, colorVariants ? [] # default: all
}:
let
pname = "vimix-icon-theme";
in
lib.checkListOfEnum "${pname}: color variants" [ "standard" "Amethyst" "Beryl" "Doder" "Ruby" "Black" "White" ] colorVariants
stdenv.mkDerivation rec {
pname = "vimix-icon-theme";
inherit pname;
version = "2021-11-09";
src = fetchFromGitHub {
@ -23,10 +36,16 @@ stdenv.mkDerivation rec {
installPhase = ''
runHook preInstall
patchShebangs install.sh
./install.sh -a -d $out/share/icons
./install.sh \
${if colorVariants != [] then builtins.toString colorVariants else "-a"} \
-d $out/share/icons
# replace duplicate files with symlinks
jdupes -l -r $out/share/icons
runHook postInstall
'';