From 6159106f30bc7025ee3925eb9e25352a01c9b668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Wed, 14 Jul 2021 11:31:25 -0300 Subject: [PATCH] qogir-icon-theme: make relative symlinks for duplicates This approximately halves the size of the package --- pkgs/data/icons/qogir-icon-theme/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/data/icons/qogir-icon-theme/default.nix b/pkgs/data/icons/qogir-icon-theme/default.nix index 7e03ca53d81..00de4f6760c 100644 --- a/pkgs/data/icons/qogir-icon-theme/default.nix +++ b/pkgs/data/icons/qogir-icon-theme/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, gtk3, hicolor-icon-theme }: +{ lib, stdenv, fetchFromGitHub, gtk3, hicolor-icon-theme, jdupes }: stdenv.mkDerivation rec { pname = "qogir-icon-theme"; @@ -11,17 +11,22 @@ stdenv.mkDerivation rec { sha256 = "0anma2ss3yqr9njx4ay2nyxjkgnj7ky17c93ipwgrvgsv8jk5nn2"; }; - nativeBuildInputs = [ gtk3 ]; + nativeBuildInputs = [ gtk3 jdupes ]; propagatedBuildInputs = [ hicolor-icon-theme ]; dontDropIconThemeCache = true; + # These fixup steps are slow and unnecessary. + dontPatchELF = true; + dontRewriteSymlinks = true; + installPhase = '' runHook preInstall patchShebangs install.sh mkdir -p $out/share/icons name= ./install.sh -d $out/share/icons + jdupes -l -r $out/share/icons runHook postInstall '';