moka-icon-theme: replace duplicate files with symlinks

This reduces considerably the space used by the package.
This commit is contained in:
José Romildo 2021-11-14 11:27:13 -03:00
parent 9201d388ed
commit 27bfd79741

View file

@ -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";