aboutsummaryrefslogtreecommitdiff
path: root/doc/manual
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2023-02-20 22:25:55 +0100
committerGitHub <noreply@github.com>2023-02-20 22:25:55 +0100
commitdf6829e0d787772b0beaba38248fca8392bcaffe (patch)
treefc24370b0028c4491bff806b2883f311fabcdd65 /doc/manual
parent924ef6761bbbc75fda3cf85dc1c8d782130291b4 (diff)
parent807ef8f73434ce1c1cdcd21fe603356d1f3fd94e (diff)
Merge pull request #7867 from NixOS/hacking-cross
doc/hacking.md: Corrections and additions for cross
Diffstat (limited to 'doc/manual')
-rw-r--r--doc/manual/src/contributing/hacking.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/manual/src/contributing/hacking.md b/doc/manual/src/contributing/hacking.md
index d16ffa4af..3869c37a4 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: