topgrade: fix Darwin build (#541141)

This commit is contained in:
nixpkgs-ci[bot]
2026-07-13 02:42:41 +00:00
committed by GitHub
+10 -5
View File
@@ -4,6 +4,7 @@
fetchFromGitHub,
rustPlatform,
installShellFiles,
llvmPackages,
}:
rustPlatform.buildRustPackage (finalAttrs: {
@@ -21,14 +22,18 @@ rustPlatform.buildRustPackage (finalAttrs: {
nativeBuildInputs = [
installShellFiles
];
]
# TODO: Remove once #536365 reaches this branch
++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ];
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.hostPlatform.isDarwin [
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
NIX_CFLAGS_COMPILE = toString [
"-framework"
"AppKit"
]
);
];
# TODO: Remove once #536365 reaches this branch
NIX_CFLAGS_LINK = "-fuse-ld=lld";
};
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd topgrade \