diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix index 7472cc1155db..e1072e07d6ea 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix @@ -34,6 +34,7 @@ libjxl, libicns, apple-sdk_15, + llvmPackages, nix-update-script, }: @@ -67,6 +68,11 @@ stdenv.mkDerivation (finalAttrs: { # to build bundled libdispatch clang gobject-introspection + ] + # Work around ld64's libc++ hardening issue causing Trace/BPT trap: 5 + # TODO: Remove once nixpkgs#536365 reaches this branch. + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + llvmPackages.lld ]; buildInputs = [ @@ -102,6 +108,12 @@ stdenv.mkDerivation (finalAttrs: { dontWrapQtApps = true; + # Work around ld64's libc++ hardening issue causing Trace/BPT trap: 5 + # TODO: Remove once nixpkgs#536365 reaches this branch. + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { + NIX_CFLAGS_LINK = "-fuse-ld=lld"; + }; + cmakeFlags = [ # We're allowed to used the API ID of the Snap package: (lib.cmakeFeature "TDESKTOP_API_ID" "611335")