diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-02-20 12:20:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 12:20:08 +0100 |
commit | 807ef8f73434ce1c1cdcd21fe603356d1f3fd94e (patch) | |
tree | bb0b7d6133b7be0fc2d6d7f45bd326d0737d78e9 /doc | |
parent | 9a3f66d9d97a99d811ddbe9f4a7e84e306ae79fa (diff) |
doc/hacking.md: Corrections and additions for cross
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual/src/contributing/hacking.md | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/manual/src/contributing/hacking.md b/doc/manual/src/contributing/hacking.md index f5c76f837..5c373c42b 100644 --- a/doc/manual/src/contributing/hacking.md +++ b/doc/manual/src/contributing/hacking.md @@ -110,7 +110,7 @@ $ nix-build You can also build Nix for one of the [supported target platforms](#target-platforms). -## Target platforms +## Platforms As specified in [`flake.nix`], Nix can be built for various platforms: @@ -122,14 +122,15 @@ As specified in [`flake.nix`], Nix can be built for various platforms: [`flake.nix`]: https://github.com/nixos/nix/blob/master/flake.nix In order to build Nix for a different platform than the one you're currently -one, you need to have some way for your system Nix to build code for that +on, you need to have some way for your system Nix to build code for that platform. Common solutions include [remote builders] and [binfmt emulation] (only supported on NixOS). [remote builders]: ../advanced-topics/distributed-builds.md [binfmt emulation]: https://nixos.org/manual/nixos/stable/options.html#opt-boot.binfmt.emulatedSystems -Once you are able to build for different platforms, executing the build is as simple as +These solutions let Nix perform builds as if you're on the native platform, so +executing the build is as simple as ```console $ nix build .#packages.aarch64-linux.default @@ -145,6 +146,8 @@ for classic Nix. You can use any of the other supported platforms in place of `aarch64-linux`. +Cross-compiled builds are available for ARMv6 and ARMv7, and Nix on unsupported platforms can be bootstrapped by adding more `crossSystems` in `flake.nix`. + ## Compilation environments Nix can be compiled using multiple environments: |