From 23c83f33eca0e330ce1304cc5d9fdfe8bad7b538 Mon Sep 17 00:00:00 2001 From: Mukul Agarwal Date: Mon, 13 Jul 2026 20:16:46 -0400 Subject: [PATCH] qtspeech: fix build on Darwin --- pkgs/development/libraries/qt-6/modules/qtspeech.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtspeech.nix b/pkgs/development/libraries/qt-6/modules/qtspeech.nix index 4867bcaf7ee9..f87953f6fe81 100644 --- a/pkgs/development/libraries/qt-6/modules/qtspeech.nix +++ b/pkgs/development/libraries/qt-6/modules/qtspeech.nix @@ -2,6 +2,7 @@ qtModule, lib, stdenv, + llvmPackages, qtbase, qtmultimedia, pkg-config, @@ -12,7 +13,10 @@ qtModule { pname = "qtspeech"; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ flite alsa-lib @@ -22,4 +26,9 @@ qtModule { qtbase qtmultimedia ]; + 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"; + }; }