Merge pull request #159408 from romildo/upd.vimix-icon-theme
vimix-icon-theme: allow selection of color variants
This commit is contained in:
commit
e2aa7ace2f
1 changed files with 23 additions and 4 deletions
|
@ -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
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue