noti: fix build on Darwin (#541626)

This commit is contained in:
Emily
2026-07-15 02:00:50 +00:00
committed by GitHub

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"