vimix-icon-theme: allow selection of color variants
This commit is contained in:
parent
5f5ff6fe12
commit
6cdad97e74
1 changed files with 22 additions and 3 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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "vimix-icon-theme";
|
inherit pname;
|
||||||
version = "2021-11-09";
|
version = "2021-11-09";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
@ -23,10 +36,16 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
patchShebangs install.sh
|
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
|
# replace duplicate files with symlinks
|
||||||
jdupes -l -r $out/share/icons
|
jdupes -l -r $out/share/icons
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue