Merge pull request #125361 from andir/staging/graphicsmagic-closure-bloat

[staging] graphicsmagic: reduce runtime closure bloat

authored by Robert Scott and committed by GitHub 99d13e8c d776739d

+9 -3
+9 -3
pkgs/applications/graphics/graphicsmagick/default.nix
··· 1 1 { lib, stdenv, fetchurl, bzip2, freetype, graphviz, ghostscript 2 2 , libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz, libX11 3 - , libwebp, quantumdepth ? 8, fixDarwinDylibNames }: 3 + , libwebp, quantumdepth ? 8, fixDarwinDylibNames, nukeReferences }: 4 4 5 5 stdenv.mkDerivation rec { 6 6 pname = "graphicsmagick"; ··· 27 27 zlib libtool libwebp 28 28 ]; 29 29 30 - nativeBuildInputs = [ xz ] 31 - ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; 30 + nativeBuildInputs = [ xz nukeReferences ] 31 + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; 32 + 33 + # Remove CFLAGS from the binaries to avoid closure bloat. 34 + # In the past we have had -dev packages in the closure of the binaries soley due to the string references. 35 + postConfigure = '' 36 + nuke-refs ./magick/magick_config.h 37 + ''; 32 38 33 39 postInstall = '' 34 40 sed -i 's/-ltiff.*'\'/\'/ $out/bin/*