From 27bfd79741808003a7041ef3bbf62472e9ea15ee Mon Sep 17 00:00:00 2001 From: José Romildo Date: Sun, 14 Nov 2021 11:27:13 -0300 Subject: moka-icon-theme: replace duplicate files with symlinks This reduces considerably the space used by the package. --- pkgs/data/icons/moka-icon-theme/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pkgs/data/icons') diff --git a/pkgs/data/icons/moka-icon-theme/default.nix b/pkgs/data/icons/moka-icon-theme/default.nix index 9ae2e39250d38..04e1bce127509 100644 --- a/pkgs/data/icons/moka-icon-theme/default.nix +++ b/pkgs/data/icons/moka-icon-theme/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, meson, ninja, gtk3, python3, faba-icon-theme, hicolor-icon-theme }: +{ lib, stdenv, fetchFromGitHub, meson, ninja, gtk3, python3, faba-icon-theme, hicolor-icon-theme, jdupes }: stdenv.mkDerivation rec { pname = "moka-icon-theme"; @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { ninja gtk3 python3 + jdupes ]; propagatedBuildInputs = [ @@ -25,10 +26,19 @@ stdenv.mkDerivation rec { dontDropIconThemeCache = true; + # These fixup steps are slow and unnecessary for this package + dontPatchELF = true; + dontRewriteSymlinks = true; + postPatch = '' patchShebangs meson/post_install.py ''; + postInstall = '' + # replace duplicate files with symlinks + jdupes -l -r $out/share/icons + ''; + meta = with lib; { description = "Icon theme designed with a minimal flat style using simple geometry and bright colours"; homepage = "https://snwh.org/moka"; -- cgit 1.4.1