From 1f17084b7b2ceeb823f75f6f43e41cda57d09694 Mon Sep 17 00:00:00 2001 From: Samiser Date: Sat, 18 Jul 2026 19:41:17 +0100 Subject: [PATCH] watchexec: fix build on darwin by linking with lld --- pkgs/by-name/wa/watchexec/package.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/wa/watchexec/package.nix b/pkgs/by-name/wa/watchexec/package.nix index 0bf91b22f52a..784dfe8f14a5 100644 --- a/pkgs/by-name/wa/watchexec/package.nix +++ b/pkgs/by-name/wa/watchexec/package.nix @@ -4,6 +4,7 @@ rustPlatform, fetchFromGitHub, installShellFiles, + llvmPackages, nix-update-script, }: @@ -20,13 +21,21 @@ rustPlatform.buildRustPackage (finalAttrs: { cargoHash = "sha256-ZwF5nNI2ESwgaH129MhcJPlhtmxqwhhQ9W49u9bilRk="; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # TODO: Remove once #536365 reaches this branch + llvmPackages.lld + ]; env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_LDFLAGS = toString [ "-framework" "AppKit" ]; + # TODO: Remove once #536365 reaches this branch + NIX_CFLAGS_LINK = "-fuse-ld=lld"; }; checkFlags = [