about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/graphics/graphicsmagick/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/graphics/graphicsmagick/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/graphics/graphicsmagick/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/applications/graphics/graphicsmagick/default.nix b/nixpkgs/pkgs/applications/graphics/graphicsmagick/default.nix
index 583dcf7c618a..13752bfc05db 100644
--- a/nixpkgs/pkgs/applications/graphics/graphicsmagick/default.nix
+++ b/nixpkgs/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/*