…crash
The nixpkgs bump carried by PR #1970 ships a classic ld64
(cctools-binutils-darwin-1010.6) whose stubs pass crashes with
'Trace/BPT trap: 5' when linking any Rust binary that pulls
mac-notification-sys via notify-rust. freminal 0.11.1 is such a
binary (its notifications feature depends on notify-rust), so every
aarch64-darwin freminal build fails with exit code 133 out of
cctools-binutils-darwin-1010.6/bin/ld. This is the same failure mode
that killed the removed cargo-watch and that nixpkgs upstream just
hot-fixed for starship in NixOS/nixpkgs#540463 (fixes #540450).
Apply the same recipe to the freminal home-manager package on darwin
only:
- add llvmPackages.lld to nativeBuildInputs
- set env.NIX_CFLAGS_LINK = '-fuse-ld=lld' so rustc's cc-driven link
step uses LLVM's lld instead of the broken classic ld64
Wire it in via features/desktop/freminal/default.nix, which is the
darwin-only importer of the feature. Linux freminal is untouched
(gated on pkgs.stdenv.hostPlatform.isDarwin); confirmed by a local
Daytona (Linux) build resolving to an unmodified upstream derivation
via the Attic cache, and by the Freds-MacBook-Pro darwinConfiguration
now producing a fresh drv whose env contains NIX_CFLAGS_LINK and
whose closure references lld-21.1.8.
Registered in .github/tracked-upstream-fixes.json as
nixpkgs-536365-ld64-mac-notification-sys with check type
nixpkgs-pin-contains-commit and fix_commit set to the zero sha so the
entry is permanently BLOCKED until #536365 (the root ld64 fix)
merges; at that point we update fix_commit to the merge sha and the
weekly upstream-fix tracker will flag the revert once #536365 lands
in our pinned nixpkgs.
All nine nixosConfigurations and both darwinConfigurations still
evaluate cleanly.
Unblocks #1970.
Use LLVM ld64.lld for Darwin builds instead of nixpkgs classic ld64. The classic open-source ld64 currently crashes in its stubs pass when linking the mac-notification-sys Objective-C object pulled in by starship default features.
This keeps the default notify feature enabled; only the Darwin linker is changed.
Assisted-by: OpenAI Codex (GPT-5.5)
Fixes #540450
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.