From 75771333d22f0e44998e456fd06464502084095d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Mon, 25 May 2020 17:04:39 -0300 Subject: [PATCH] deepin.deepin-icon-theme: 15.12.71 -> 2020.05.21 --- .../deepin/deepin-icon-theme/default.nix | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/pkgs/desktops/deepin/deepin-icon-theme/default.nix b/pkgs/desktops/deepin/deepin-icon-theme/default.nix index 464d6f19ced..b56b219faff 100644 --- a/pkgs/desktops/deepin/deepin-icon-theme/default.nix +++ b/pkgs/desktops/deepin/deepin-icon-theme/default.nix @@ -3,19 +3,19 @@ , gtk3 , xcursorgen , papirus-icon-theme -, deepin , hicolor-icon-theme +, deepin }: stdenv.mkDerivation rec { pname = "deepin-icon-theme"; - version = "15.12.71"; + version = "2020.05.21"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "12rzzjp906np95ckbxrd4mb345lm198wz69kxy48f8q1zg78q8iw"; + sha256 = "0b1s6kf0q804zbbghly981wzacy1spi8168shf3x8w95rqj6463p"; }; nativeBuildInputs = [ @@ -30,22 +30,29 @@ stdenv.mkDerivation rec { dontDropIconThemeCache = true; - postPatch = '' - patchShebangs tools/hicolor.links - patchShebangs tools/display_unused_links.sh - patchShebangs cursors-src/cursors/bitmaps/make.sh - patchShebangs cursors-src/render-cursors.sh + buildTargets = "all hicolor-links"; - # keep icon-theme.cache - sed -i -e 's|\(-rm -f .*/icon-theme.cache\)|# \1|g' Makefile + postPatch = '' + # fix: hicolor links should follow the deepin -> bloom naming change + # https://github.com/linuxdeepin/deepin-icon-theme/pull/24 + substituteInPlace tools/hicolor.links --replace deepin bloom + + substituteInPlace Sea/index.theme --replace Inherits=deepin Inherits=bloom ''; - buildTargets = "all hicolor-links"; - installTargets = [ "install-icons" "install-cursors" ]; - installFlags = [ "PREFIX=${placeholder "out"}" ]; + installPhase = '' + runHook preInstall - postInstall = '' - cp -a ./Sea ./usr/share/icons/hicolor "$out"/share/icons/ + mkdir -p $out/share/icons + cp -vai bloom* Sea $out/share/icons + + for theme in $out/share/icons/*; do + gtk-update-icon-cache $theme + done + + cp -vai usr/share/icons/hicolor $out/share/icons + + runHook postInstall ''; passthru.updateScript = deepin.updateScript { inherit pname version src; };