Merge pull request #159408 from romildo/upd.vimix-icon-theme

vimix-icon-theme: allow selection of color variants
This commit is contained in:
Renaud 2022-02-17 23:17:42 +01:00 committed by GitHub
commit e2aa7ace2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
jdupes -L -r $out/share/icons
runHook postInstall
'';