From 3739c52a6077e4e8e0d96df2b3cc4b4fa87b71fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 11 Jan 2022 10:27:04 -0300 Subject: [PATCH] sierra-gtk-theme: replace duplicate files with hardlinks --- pkgs/data/themes/sierra/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/data/themes/sierra/default.nix b/pkgs/data/themes/sierra/default.nix index 93983f87f377..fb960d843abd 100644 --- a/pkgs/data/themes/sierra/default.nix +++ b/pkgs/data/themes/sierra/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , gdk-pixbuf , gtk-engine-murrine +, jdupes , librsvg , libxml2 }: @@ -19,6 +20,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ + jdupes libxml2 ]; @@ -33,9 +35,16 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall + patchShebangs . + mkdir -p $out/share/themes name= ./install.sh --dest $out/share/themes + + # Replace duplicate files with hardlinks to the first file in each + # set of duplicates, reducing the installed size in about 79% + jdupes -L -r $out/share + runHook postInstall '';