telegram-desktop: work around ld64 hardening issue

This commit is contained in:
Mio
2026-07-12 20:25:20 +12:00
parent f8cc9d1b80
commit f5616cc38c
@@ -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")