noti: fix build on Darwin

This commit is contained in:
Mukul Agarwal
2026-07-13 19:21:36 -04:00
parent e9274018d2
commit f2722a7fad
+12 -1
View File
@@ -1,7 +1,9 @@
{
lib,
stdenv,
buildGoModule,
fetchFromCodeberg,
llvmPackages,
installShellFiles,
}:
@@ -18,10 +20,19 @@ buildGoModule (finalAttrs: {
vendorHash = null;
nativeBuildInputs = [ installShellFiles ];
nativeBuildInputs = [
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ];
subPackages = [ "cmd/noti" ];
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";
};
ldflags = [
"-s"
"-w"