From e39e53c6c6a82f41bef75c5e0a3d01315d17bb88 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 3 Jul 2026 16:15:51 +0100 Subject: [PATCH] python{313,314}Packages.matplotlib: work around `ld64` hardening issue --- .../python-modules/matplotlib/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index ab1d363fc6ab..bee69a777e5e 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -62,6 +62,9 @@ # Reverse dependency sage, + + # TODO: Clean up on `staging`. + llvmPackages, }: let @@ -104,7 +107,12 @@ buildPythonPackage (finalAttrs: { --replace-fail libwayland-client.so.0 ${wayland}/lib/libwayland-client.so.0 ''; - nativeBuildInputs = [ pkg-config ] ++ lib.optionals enableGtk3 [ gobject-introspection ]; + nativeBuildInputs = [ + pkg-config + ] + ++ lib.optionals enableGtk3 [ gobject-introspection ] + # TODO: Clean up on `staging`. + ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; buildInputs = [ ffmpeg-headless @@ -160,6 +168,11 @@ buildPythonPackage (finalAttrs: { b_lto = false; }; + # TODO: Clean up on `staging`. + env.${if stdenv.hostPlatform.isDarwin then "CC_LD" else null} = "lld"; + env.${if stdenv.hostPlatform.isDarwin then "CXX_LD" else null} = "lld"; + env.${if stdenv.hostPlatform.isDarwin then "OBJC_LD" else null} = "lld"; + passthru.tests = { inherit sage; };