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"; + }; }