New Aarch64 (and armv7l-linux omg!) builders!

tl;dr: nix build --argstr system armv7l-linux --extra-platforms armv7l-linux nixpkgs.hello

For armv7 builds, simply pass --argstr system armv7l-linux so that nixpkgs knows not to build for the autodetected system (which would be aarch64), and --extra-platforms armv7l-linux to convince nix that it is in fact a natively supported platform. I think this should work for armv6 as well, should you want to build something for your older raspberry pi :slight_smile:

Caveat: many packages close to the roots of various dependency trees (e.g. openssl) will attempt to autodetect the build platform based on uname (which still returns aarch64) and fail as a result. Implementing Always cross compile · Issue #21471 · NixOS/nixpkgs · GitHub (cc @Ericson2314) would fix this, but I believe it’s still quite a way off from actually happening, if it happens at all.

(but at least nethack works!)

2 Likes