summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2021-06-05 12:17:00 +0100
committerGitHub <noreply@github.com>2021-06-05 12:17:00 +0100
commit99d13e8c012fe6ff84f49d8331a12fca63c016ca (patch)
treee25f3a702a1644ee669d7d2fb4a7f4043bf86ba6 /pkgs/applications/graphics
parentd776739d9998becc8926cdb04af08340f4be5b5b (diff)
parenta1ab165b81f253cd384c8a674011302631bf7399 (diff)
downloadnixpkgs-99d13e8c012fe6ff84f49d8331a12fca63c016ca.tar
nixpkgs-99d13e8c012fe6ff84f49d8331a12fca63c016ca.tar.gz
nixpkgs-99d13e8c012fe6ff84f49d8331a12fca63c016ca.tar.bz2
nixpkgs-99d13e8c012fe6ff84f49d8331a12fca63c016ca.tar.lz
nixpkgs-99d13e8c012fe6ff84f49d8331a12fca63c016ca.tar.xz
nixpkgs-99d13e8c012fe6ff84f49d8331a12fca63c016ca.tar.zst
nixpkgs-99d13e8c012fe6ff84f49d8331a12fca63c016ca.zip
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.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/applications/graphics/graphicsmagick/default.nix b/pkgs/applications/graphics/graphicsmagick/default.nix
index 583dcf7c618..13752bfc05d 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/*