graphicsmagick: reduce runtime closure size
Before this commit we had libxml and freetype development files as part of the runtime closure of graphicsmagick. Both of these combined added up to 2MiB. With this commit those references are now gone :-)
This commit is contained in:
parent
b70b74f52a
commit
a1ab165b81
|
@ -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/*
|
||||
|
|
Loading…
Reference in a new issue