From 3aad607343efb414fdf22fc1284c99c3f640ed3e Mon Sep 17 00:00:00 2001 From: Mukul Agarwal Date: Mon, 13 Jul 2026 20:48:49 -0400 Subject: [PATCH] darktable: fix build on Darwin --- pkgs/by-name/da/darktable/package.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/da/darktable/package.nix b/pkgs/by-name/da/darktable/package.nix index c954ded2f1f6..d70fc071213a 100644 --- a/pkgs/by-name/da/darktable/package.nix +++ b/pkgs/by-name/da/darktable/package.nix @@ -103,7 +103,8 @@ stdenv.mkDerivation rec { pkg-config wrapGAppsHook3 saxon # Use Saxon instead of libxslt to fix XSLT generate-id() consistency issues - ]; + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; buildInputs = [ SDL2 @@ -184,6 +185,12 @@ stdenv.mkDerivation rec { "-DUSE_KWALLET=OFF" ]; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { + # Work around ld64's libc++ hardening issue. + # TODO: Remove once #536365 reaches this branch. + NIX_CFLAGS_LINK = "-fuse-ld=lld"; + }; + # darktable changed its rpath handling in commit # 83c70b876af6484506901e6b381304ae0d073d3c and as a result the # binaries can't find libdarktable.so, so change LD_LIBRARY_PATH in