diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-07-25 14:54:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 14:54:13 +0200 |
commit | a6da594e8a82920e4076fc88a708ff27d53afdde (patch) | |
tree | c584f261d2c7a3a25638ec1f29a7365d8c7f39a0 /pkgs/data | |
parent | 0f860694c5217574e6970256fd543a69ba749f01 (diff) | |
parent | 62b8d182019cf5ea8c97b5e2fee491b947776250 (diff) |
Merge pull request #182725 from kilianar/whitesur-icon-theme-2022-05-11
Diffstat (limited to 'pkgs/data')
-rw-r--r-- | pkgs/data/icons/whitesur-icon-theme/default.nix | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/pkgs/data/icons/whitesur-icon-theme/default.nix b/pkgs/data/icons/whitesur-icon-theme/default.nix index c20a3dfe1950..8708ee28807d 100644 --- a/pkgs/data/icons/whitesur-icon-theme/default.nix +++ b/pkgs/data/icons/whitesur-icon-theme/default.nix @@ -1,42 +1,54 @@ -{ lib, stdenvNoCC, fetchFromGitHub, gtk3, hicolor-icon-theme }: +{ lib +, stdenvNoCC +, fetchFromGitHub +, gtk3 +, hicolor-icon-theme +, jdupes +, boldPanelIcons ? false +, blackPanelIcons ? false +, themeVariants ? [] +}: -stdenvNoCC.mkDerivation rec { +let pname = "Whitesur-icon-theme"; - version = "2022-03-18"; +in +lib.checkListOfEnum "${pname}: theme variants" [ "default" "purple" "pink" "red" "orange" "yellow" "green" "grey" "nord" "all" ] themeVariants + +stdenvNoCC.mkDerivation rec { + 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} - - # 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 + ./install.sh --dest $out/share/icons \ + --name WhiteSur \ + --theme ${builtins.toString themeVariants} \ + ${lib.optionalString boldPanelIcons "--bold"} \ + ${lib.optionalString blackPanelIcons "--black"} - for theme in $out/share/icons/*; do - gtk-update-icon-cache $theme - done + jdupes --link-soft --recurse $out/share runHook postInstall ''; |