diff --git a/pkgs/data/icons/vimix-icon-theme/default.nix b/pkgs/data/icons/vimix-icon-theme/default.nix index 502a8023c9bd..c1a710b2f6de 100644 --- a/pkgs/data/icons/vimix-icon-theme/default.nix +++ b/pkgs/data/icons/vimix-icon-theme/default.nix @@ -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 '';