From f5616cc38c3ec227efa85d9f7c9195837efab8c3 Mon Sep 17 00:00:00 2001 From: Mio Date: Sun, 12 Jul 2026 20:25:20 +1200 Subject: [PATCH] telegram-desktop: work around ld64 hardening issue --- .../telegram/telegram-desktop/unwrapped.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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")