2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gtk3
|
|
|
|
, hicolor-icon-theme
|
|
|
|
, jdupes
|
|
|
|
, boldPanelIcons ? false
|
|
|
|
, blackPanelIcons ? false
|
|
|
|
, themeVariants ? []
|
|
|
|
}:
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
let
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "Whitesur-icon-theme";
|
2022-08-12 12:06:08 +00:00
|
|
|
in
|
2022-09-09 14:08:57 +00:00
|
|
|
lib.checkListOfEnum "${pname}: theme variants" [
|
|
|
|
"default"
|
|
|
|
"purple"
|
|
|
|
"pink"
|
|
|
|
"red"
|
|
|
|
"orange"
|
|
|
|
"yellow"
|
|
|
|
"green"
|
|
|
|
"grey"
|
|
|
|
"nord"
|
|
|
|
"all"
|
|
|
|
] themeVariants
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
inherit pname;
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "2022-08-30";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "pcvRD4CUwUT46/kmMbnerj5mqPCcHIRreVIh9wz6Kfg=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [ gtk3 jdupes ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
buildInputs = [ hicolor-icon-theme ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
# These fixup steps are slow and unnecessary
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontRewriteSymlinks = true;
|
2021-06-28 23:13:55 +00:00
|
|
|
dontDropIconThemeCache = true;
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs install.sh
|
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
./install.sh --dest $out/share/icons \
|
|
|
|
--name WhiteSur \
|
|
|
|
--theme ${builtins.toString themeVariants} \
|
|
|
|
${lib.optionalString boldPanelIcons "--bold"} \
|
|
|
|
${lib.optionalString blackPanelIcons "--black"}
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
jdupes --link-soft --recurse $out/share
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "MacOS Big Sur style icon theme for Linux desktops";
|
|
|
|
homepage = "https://github.com/vinceliuice/WhiteSur-icon-theme";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ icy-thought ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|