diff options
author | Robert Scott <code@humanleg.org.uk> | 2021-06-05 12:17:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-05 12:17:00 +0100 |
commit | 99d13e8c012fe6ff84f49d8331a12fca63c016ca (patch) | |
tree | e25f3a702a1644ee669d7d2fb4a7f4043bf86ba6 /pkgs/applications/graphics | |
parent | d776739d9998becc8926cdb04af08340f4be5b5b (diff) | |
parent | a1ab165b81f253cd384c8a674011302631bf7399 (diff) |
Merge pull request #125361 from andir/staging/graphicsmagic-closure-bloat
[staging] graphicsmagic: reduce runtime closure bloat
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r-- | pkgs/applications/graphics/graphicsmagick/default.nix | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/applications/graphics/graphicsmagick/default.nix b/pkgs/applications/graphics/graphicsmagick/default.nix index 583dcf7c618a9..13752bfc05dbf 100644 --- a/pkgs/applications/graphics/graphicsmagick/default.nix +++ b/pkgs/applications/graphics/graphicsmagick/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, bzip2, freetype, graphviz, ghostscript , libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz, libX11 -, libwebp, quantumdepth ? 8, fixDarwinDylibNames }: +, libwebp, quantumdepth ? 8, fixDarwinDylibNames, nukeReferences }: stdenv.mkDerivation rec { pname = "graphicsmagick"; @@ -27,8 +27,14 @@ stdenv.mkDerivation rec { zlib libtool libwebp ]; - nativeBuildInputs = [ xz ] - ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ xz nukeReferences ] + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + + # Remove CFLAGS from the binaries to avoid closure bloat. + # In the past we have had -dev packages in the closure of the binaries soley due to the string references. + postConfigure = '' + nuke-refs ./magick/magick_config.h + ''; postInstall = '' sed -i 's/-ltiff.*'\'/\'/ $out/bin/* |