3
0
Fork 0
forked from mirrors/nixpkgs

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

[staging] graphicsmagic: reduce runtime closure bloat
This commit is contained in:
Robert Scott 2021-06-05 12:17:00 +01:00 committed by GitHub
commit 99d13e8c01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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/*