git.iko.soy/typeable/nixpkgs
on master help sign in
sierra-gtk-theme: replace duplicate files with hardlinks
commit3739c52a6077e4e8e0d96df2b3cc4b4fa87b71fa authorJosé Romildo <malaquias@gmail.com> dateTue 11 Jan 2022, 10:27 (5 years ago) parenta6f0668
1 file changed+9
pkgs/data/themes/sierra/default.nix+9
pkgs/data/themes/sierra/default.nix+9
@@ -3,6 +3,7 @@
33, fetchFromGitHub
44, gdk-pixbuf
55, gtk-engine-murrine
6+, jdupes
67, librsvg
78, libxml2
89}:
@@ -19,6 +20,7 @@ stdenv.mkDerivation rec {
1920 };
2021
2122 nativeBuildInputs = [
23+ jdupes
2224 libxml2
2325 ];
2426
@@ -33,9 +35,16 @@ stdenv.mkDerivation rec {
3335
3436 installPhase = ''
3537 runHook preInstall
38+
3639 patchShebangs .
40+
3741 mkdir -p $out/share/themes
3842 name= ./install.sh --dest $out/share/themes
43+
44+ # Replace duplicate files with hardlinks to the first file in each
45+ # set of duplicates, reducing the installed size in about 79%
46+ jdupes -L -r $out/share
47+
3948 runHook postInstall
4049 '';
4150