From fbbfc3edfa4a90743e0f0db179abb242da4c6a4c Mon Sep 17 00:00:00 2001 From: José Romildo Date: Sun, 14 Nov 2021 10:49:57 -0300 Subject: paper-icon-theme: replace duplicate files with symlinks This reduces considerably the space used by the package. --- pkgs/data/icons/paper-icon-theme/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/data/icons/paper-icon-theme/default.nix b/pkgs/data/icons/paper-icon-theme/default.nix index 9ab6fe1b589..fc541f6e5b7 100644 --- a/pkgs/data/icons/paper-icon-theme/default.nix +++ b/pkgs/data/icons/paper-icon-theme/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, meson, ninja, gtk3, gnome, gnome-icon-theme, hicolor-icon-theme }: +{ lib, stdenv, fetchFromGitHub, meson, ninja, gtk3, gnome, gnome-icon-theme, hicolor-icon-theme, jdupes }: stdenv.mkDerivation rec { pname = "paper-icon-theme"; @@ -15,6 +15,7 @@ stdenv.mkDerivation rec { meson ninja gtk3 + jdupes ]; propagatedBuildInputs = [ @@ -25,9 +26,16 @@ stdenv.mkDerivation rec { dontDropIconThemeCache = true; + # These fixup steps are slow and unnecessary for this package + dontPatchELF = true; + dontRewriteSymlinks = true; + postInstall = '' # The cache for Paper-Mono-Dark is missing gtk-update-icon-cache "$out"/share/icons/Paper-Mono-Dark; + + # replace duplicate files with symlinks + jdupes -l -r $out/share/icons ''; meta = with lib; { -- cgit 1.4.1