$nix-build '<nixpkgs>' -A pkgsCross.raspberryPi.hello
and, because I’ve enabled flakes:
$ nix build -f channel:nixpkgs-unstable pkgsCross.raspberryPi.hello
and they both failed with “exec format error”, indicating that something is trying to run cross-compiled binaries on the host system. Here’s a full build log: cross-compile hello build log · GitHub.
I’m puzzled because this seems like a very basic cross-compilation task, so there’s possibly something fundamentally wrong with my setup. Everything not related to pkgsCross seems to work as expected.
I’m on NixOS 22.11, in a aarch-linux UTM virtual machine running on macOS M1.