about summary refs log tree commit diff
path: root/pkgs/misc/ghostscript
diff options
context:
space:
mode:
authorVincenzo Mantova <1962985+xworld21@users.noreply.github.com>2023-11-05 19:46:28 +0000
committerGitHub <noreply@github.com>2023-11-05 14:46:28 -0500
commit87d7169f5ce581372118a387748a503b740637c8 (patch)
treebe4edc93033d7337b9b2783c8ae8d5fa0fc20d4d /pkgs/misc/ghostscript
parent545696ef578148c0a164dbb4a15a84ed90a71bbc (diff)
downloadnixlib-87d7169f5ce581372118a387748a503b740637c8.tar
nixlib-87d7169f5ce581372118a387748a503b740637c8.tar.gz
nixlib-87d7169f5ce581372118a387748a503b740637c8.tar.bz2
nixlib-87d7169f5ce581372118a387748a503b740637c8.tar.lz
nixlib-87d7169f5ce581372118a387748a503b740637c8.tar.xz
nixlib-87d7169f5ce581372118a387748a503b740637c8.tar.zst
nixlib-87d7169f5ce581372118a387748a503b740637c8.zip
ghostscript: pad headers at link time to prevent install_name_tool failure on Darwin (#263833)
Diffstat (limited to 'pkgs/misc/ghostscript')
-rw-r--r--pkgs/misc/ghostscript/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix
index 013a35806267..b85e162efb72 100644
--- a/pkgs/misc/ghostscript/default.nix
+++ b/pkgs/misc/ghostscript/default.nix
@@ -122,7 +122,10 @@ stdenv.mkDerivation rec {
   doCheck = false;
 
   # don't build/install statically linked bin/gs
-  buildFlags = [ "so" ];
+  buildFlags = [ "so" ]
+    # without -headerpad, the following error occurs on Darwin when compiling with X11 support (as of 10.02.0)
+    # error: install_name_tool: changing install names or rpaths can't be redone for: [...]libgs.dylib.10 (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
+    ++ lib.optional (x11Support && stdenv.isDarwin) "LDFLAGS=-headerpad_max_install_names";
   installTargets = [ "soinstall" ];
 
   postInstall = ''