about summary refs log tree commit diff
path: root/pkgs/data/icons/zafiro-icons
diff options
context:
space:
mode:
authorkilianar <mail@kilianar.de>2022-07-06 11:26:54 +0200
committersuperherointj <5861043+superherointj@users.noreply.github.com>2022-07-06 11:20:09 -0300
commitda4602bf6bc710817ba4a8a1465a4ed6c79805b6 (patch)
tree26b83490fb0495ca4eb0475a010afc10e1a6aeef /pkgs/data/icons/zafiro-icons
parentc63e60c0c26f9a3d4bc4f89d662c301956a10425 (diff)
zafiro-icons: 1.1 -> 1.2
Update to the latest upstream release:
https://github.com/zayronxio/Zafiro-icons/releases/tag/1.2

Includes some refactoring:
- use stdenvNoCC instead of stdenv
- run preInstall and postInstall hooks in the installPhase
- deduplicate files with jdupes
- set dontPatchELF and dontRewriteSymlinks to true. These fixup steps
  are slow and unnecessary for this package.
- remove single file with problematic filename causing
  gtk-update-icon-cache to fail
Diffstat (limited to 'pkgs/data/icons/zafiro-icons')
-rw-r--r--pkgs/data/icons/zafiro-icons/default.nix24
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/data/icons/zafiro-icons/default.nix b/pkgs/data/icons/zafiro-icons/default.nix
index f6c56aa3c0fcf..d7315e1005cca 100644
--- a/pkgs/data/icons/zafiro-icons/default.nix
+++ b/pkgs/data/icons/zafiro-icons/default.nix
@@ -1,18 +1,19 @@
-{ lib, stdenv, fetchFromGitHub, gtk3, breeze-icons, gnome-icon-theme, numix-icon-theme, numix-icon-theme-circle, hicolor-icon-theme }:
+{ lib, stdenvNoCC, fetchFromGitHub, gtk3, breeze-icons, gnome-icon-theme, numix-icon-theme, numix-icon-theme-circle, hicolor-icon-theme, jdupes }:
 
-stdenv.mkDerivation rec {
+stdenvNoCC.mkDerivation rec {
   pname = "zafiro-icons";
-  version = "1.1";
+  version = "1.2";
 
   src = fetchFromGitHub {
     owner = "zayronxio";
     repo = pname;
     rev = version;
-    sha256 = "05h8qm9izjbp8pnl9jpbw3y9sddhp0zmg94fm1k4d4hhdqnakqhv";
+    sha256 = "sha256-Awc5Sw4X25pXEd4Ob0u6A6Uu0e8FYfwp0fEl90vrsUE=";
   };
 
   nativeBuildInputs = [
     gtk3
+    jdupes
   ];
 
   propagatedBuildInputs = [
@@ -26,10 +27,23 @@ stdenv.mkDerivation rec {
 
   dontDropIconThemeCache = true;
 
+  dontPatchELF = true;
+  dontRewriteSymlinks = true;
+
   installPhase = ''
+    runHook preInstall
+
+    # remove copy file, as it is there clearly by mistake
+    rm "apps/scalable/android-sdk (copia 1).svg"
+
     mkdir -p $out/share/icons/Zafiro-icons
     cp -a * $out/share/icons/Zafiro-icons
-    gtk-update-icon-cache "$out"/share/icons/Zafiro-icons
+
+    gtk-update-icon-cache $out/share/icons/Zafiro-icons
+
+    jdupes --link-soft --recurse $out/share
+
+    runHook postInstall
   '';
 
   meta = with lib; {