about summary refs log tree commit diff
path: root/pkgs/data/icons
diff options
context:
space:
mode:
authorJosé Romildo <malaquias@gmail.com>2021-11-14 11:27:13 -0300
committerJosé Romildo <malaquias@gmail.com>2021-11-14 11:27:13 -0300
commit27bfd79741808003a7041ef3bbf62472e9ea15ee (patch)
treed799aeaaae020ec03887d72cd1ccf74245ed1fbc /pkgs/data/icons
parent9201d388edc76b87f7d28f4297a25f0f0ce2e2f3 (diff)
moka-icon-theme: replace duplicate files with symlinks
This reduces considerably the space used by the package.
Diffstat (limited to 'pkgs/data/icons')
-rw-r--r--pkgs/data/icons/moka-icon-theme/default.nix12
1 files changed, 11 insertions, 1 deletions
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";