watchexec: fix build on darwin by linking with lld (#543295)

This commit is contained in:
Vladimír Čunát
2026-07-19 04:45:37 +00:00
committed by GitHub
+10 -1
View File
@@ -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 = [