2022-02-20 05:27:41 +00:00
|
|
|
{ lib
|
2022-08-12 12:06:08 +00:00
|
|
|
, stdenvNoCC
|
2022-02-20 05:27:41 +00:00
|
|
|
, fetchFromGitHub
|
2023-02-02 18:25:31 +00:00
|
|
|
, gitUpdater
|
2022-02-20 05:27:41 +00:00
|
|
|
, gtk3
|
|
|
|
, hicolor-icon-theme
|
|
|
|
, jdupes
|
|
|
|
, colorVariants ? [] # default: all
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "vimix-icon-theme";
|
|
|
|
|
|
|
|
in
|
2023-02-02 18:25:31 +00:00
|
|
|
lib.checkListOfEnum "${pname}: color variants" [ "standard" "Amethyst" "Beryl" "Doder" "Ruby" "Jade" "Black" "White" ] colorVariants
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2022-02-20 05:27:41 +00:00
|
|
|
inherit pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "2023-01-18";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "5EgTWF6qu12VYVi7w5BOp7IleN4IevLZR0hH9x/qbGo=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gtk3
|
|
|
|
jdupes
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
hicolor-icon-theme
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
dontDropIconThemeCache = true;
|
|
|
|
|
|
|
|
# These fixup steps are slow and unnecessary for this package
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontRewriteSymlinks = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs install.sh
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
./install.sh \
|
|
|
|
${if colorVariants != [] then builtins.toString colorVariants else "-a"} \
|
|
|
|
-d $out/share/icons
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# replace duplicate files with symlinks
|
2023-02-02 18:25:31 +00:00
|
|
|
jdupes --quiet --link-soft --recurse $out/share
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A Material Design icon theme based on Paper icon theme";
|
|
|
|
homepage = "https://github.com/vinceliuice/vimix-icon-theme";
|
|
|
|
license = with licenses; [ cc-by-sa-40 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ romildo ];
|
|
|
|
};
|
|
|
|
}
|