2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gtk3
|
|
|
|
, hicolor-icon-theme
|
|
|
|
, jdupes
|
|
|
|
, roundedIcons ? false
|
|
|
|
, blackPanelIcons ? false
|
2022-12-28 21:21:41 +00:00
|
|
|
, allColorVariants ? false
|
2022-09-30 11:47:45 +00:00
|
|
|
, colorVariants ? [ ]
|
2022-09-09 14:08:57 +00:00
|
|
|
,
|
|
|
|
}:
|
2022-12-02 08:20:57 +00:00
|
|
|
let pname = "Fluent-icon-theme";
|
2022-09-09 14:08:57 +00:00
|
|
|
in
|
2022-12-28 21:21:41 +00:00
|
|
|
lib.checkListOfEnum "${pname}: available color variants" [ "standard" "green" "grey" "orange" "pink" "purple" "red" "yellow" "teal" ] colorVariants
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
inherit pname;
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "2023-02-01";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-Plm05+5r6p9MabLmmh8kWitALGFalruBbhAgBhPCjRo=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ gtk3 jdupes ];
|
|
|
|
|
|
|
|
buildInputs = [ hicolor-icon-theme ];
|
|
|
|
|
|
|
|
# Unnecessary & slow fixup's
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontRewriteSymlinks = true;
|
|
|
|
dontDropIconThemeCache = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs install.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
./install.sh --dest $out/share/icons \
|
|
|
|
--name Fluent \
|
|
|
|
${builtins.toString colorVariants} \
|
2022-12-28 21:21:41 +00:00
|
|
|
${lib.optionalString allColorVariants "--all"} \
|
2022-09-09 14:08:57 +00:00
|
|
|
${lib.optionalString roundedIcons "--round"} \
|
|
|
|
${lib.optionalString blackPanelIcons "--black"}
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
jdupes --quiet --link-soft --recurse $out/share
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fluent icon theme for linux desktops";
|
|
|
|
homepage = "https://github.com/vinceliuice/Fluent-icon-theme";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ icy-thought ];
|
|
|
|
};
|
|
|
|
}
|