-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Cross compiling to x86_64-darwin from aarch64-darwin seems broken #180771
Description
Describe the bug
It's currently seemingly impossible to cross compile for x86_64-darwin from aarch64-darwin, since the darwin SDK for x86_64 is old. #176661 provides some way to hack the stdenv to use the correct toolchain, but I have no idea how to integrate it with Rust.
I am testing against master, which should have that patch.
Specifically, I'm trying to build a Rust hello world for x86_64, which is trivial with cargo build --target x86_64-apple-darwin but I can't figure out how to get nixpkgs to generate that invocation with the cargoBuildHook. I've tried pkgsCross.myPackage, but that's maybe the wrong approach?
Steps To Reproduce
Steps to reproduce the behavior:
nix-build --show-trace -A pkgsCross.x86_64-darwin.cargo
error: don't yet have a `targetPackages.darwin.LibsystemCross for x86_64-apple-darwin
Expected behavior
Can build rust programs for x86_64-darwin
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Notify maintainers
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
dev/nixpkgs - [master●] » nix-shell -p nix-info --run "nix-info -m"
- system: `"aarch64-darwin"`
- host os: `Darwin 21.5.0, macOS 12.4`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.9.1`
- channels(root): `"nixpkgs"`
- channels(jade): `""`
- nixpkgs: `/nix/store/laymyq0d4724hm86igwdbsv0vl1hxfgz-nixpkgs-src`