whitesur-icon-theme: 2022-03-18 -> 2022-05-11
https://github.com/vinceliuice/WhiteSur-icon-theme/releases/tag/2022-05-11 Includes some refactoring: * use the upstream installation script * provide support for different theme variants * support bold and black panel icons * deduplicate files with jdupes * remove slow and unnecessary fixup steps
This commit is contained in:
parent
f768f10189
commit
62b8d18201
@ -1,42 +1,54 @@
|
||||
{ lib, stdenvNoCC, fetchFromGitHub, gtk3, hicolor-icon-theme }:
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
, gtk3
|
||||
, hicolor-icon-theme
|
||||
, jdupes
|
||||
, boldPanelIcons ? false
|
||||
, blackPanelIcons ? false
|
||||
, themeVariants ? []
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "Whitesur-icon-theme";
|
||||
in
|
||||
lib.checkListOfEnum "${pname}: theme variants" [ "default" "purple" "pink" "red" "orange" "yellow" "green" "grey" "nord" "all" ] themeVariants
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "Whitesur-icon-theme";
|
||||
version = "2022-03-18";
|
||||
inherit pname;
|
||||
version = "2022-05-11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vinceliuice";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "iHLxZqcDLUo62J67MwZ72CSvsHHiI9/Jk31KwkgIPr4=";
|
||||
sha256 = "sha256-7Bbkjbh6nZdYot0tJMWFuW1Jnl9U4KOLN/n+z92UWh4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gtk3 ];
|
||||
nativeBuildInputs = [ gtk3 jdupes ];
|
||||
|
||||
buildInputs = [ hicolor-icon-theme ];
|
||||
|
||||
# These fixup steps are slow and unnecessary
|
||||
dontPatchELF = true;
|
||||
dontRewriteSymlinks = true;
|
||||
|
||||
dontDropIconThemeCache = true;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs install.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/icons/WhiteSur{,-dark}/status
|
||||
echo "$out/share/icons/WhiteSur/status $out/share/icons/WhiteSur-dark/status" | xargs -n 1 cp -r src/status/{16,22,24,32,symbolic}
|
||||
echo "$out/share/icons/WhiteSur $out/share/icons/WhiteSur-dark" | xargs -n 1 cp -r ./{COPYING,AUTHORS} src/index.theme src/{actions,animations,apps,categories,devices,emblems,mimes,places} links/{actions,apps,categories,devices,emblems,mimes,places,status}
|
||||
./install.sh --dest $out/share/icons \
|
||||
--name WhiteSur \
|
||||
--theme ${builtins.toString themeVariants} \
|
||||
${lib.optionalString boldPanelIcons "--bold"} \
|
||||
${lib.optionalString blackPanelIcons "--black"}
|
||||
|
||||
# Change icon color for dark theme
|
||||
sed -i "s/#363636/#dedede/g" $out/share/icons/WhiteSur-dark/{actions,devices,places,status}/{16,22,24}/*
|
||||
sed -i "s/#363636/#dedede/g" $out/share/icons/WhiteSur-dark/actions/32/*
|
||||
sed -i "s/#363636/#dedede/g" $out/share/icons/WhiteSur-dark/{actions,apps,categories,emblems,devices,mimes,places,status}/symbolic/*
|
||||
|
||||
for f in actions animations apps categories devices emblems mimes places status; do
|
||||
ln -sf $out/share/icons/WhiteSur/$f $out/share/icons/WhiteSur/$f@2x
|
||||
ln -sf $out/share/icons/WhiteSur-dark/$f $out/share/icons/WhiteSur-dark/$f@2x
|
||||
done
|
||||
|
||||
for theme in $out/share/icons/*; do
|
||||
gtk-update-icon-cache $theme
|
||||
done
|
||||
jdupes --link-soft --recurse $out/share
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user