The `bootstrapTools.bootstrapTools` attribute, which *unpacks* the
bootstrapFiles, lies about its `system`:
78963777a4/pkgs/stdenv/linux/make-bootstrap-tools.nix (L236)
Unfortunately because of this, when building `bootstrapTools.*`,
Hydra will try to execute the cross-compiled bootstrapFiles'
`busybox` on the wrong architecture, and fail.
I originally submitted a fix for this, by filtering out the
`.bootstrapTools` attribute, in
https://github.com/NixOS/nixpkgs/pull/188339
Unfortunately my fix filtered at the wrong level of the attrset
hierarchy, and neglected to filter the `test` attribute as well.
This PR corrects those mistakes
PR #181151 added the nixCrossStatic jobs, which cross-compile
nixStatic for (currently) mips64el and powerpc64le, so users on
those platforms can use it to bootstrap their own builds of
nixpkgs/nixos:
https://github.com/NixOS/nixpkgs/pull/181151
However I unintentionally caused that PR to queue this job on *all*
Hydra builders, including the (heavily burdened) *-darwin builders:
https://hydra.nixos.org/build/203846776https://hydra.nixos.org/build/203846780
There is no need to build these derivations with a darwin
buildPlatform. Let's limit this task to only buildPlatform=*-linux.
This commit causes Hydra to build `nixStatic` on non-NixOS platforms
for which nixStatic is known to build correctly.
Providing Hydra builds of `nixStatic` on these platforms allows users
to bootstrap their local nixpkgs system without either having to:
a. Trust binaries that came from a source other than Hydra or
b. Fight with their host distribution to satisfy all of nix's large
set of build dependencies (this is not easy!)
Currently there are two platforms in this set: mips64el-linux-gnuabi64
and powerpc64le-linux-gnu.
These servers apparently no longer exist, since September 2, 2021[1].
If somebody needs this for non-Scaleway machines, they should suggest
its reintroduction with a different name.
[1]: https://news.ycombinator.com/item?id=27192757
Applies an upstreamed patch which works around a double definition of
popcount64. This change is all needed to cross compile nix to NetBSD, so
we can extend the cross-trunk jobset as well.
Adding something to lib.systems.examples means that it'll be exposed via
pkgsCross to users quite prominently. As a result we should try to
provide binary cache for at least the toolchains on a best effort
basis.
This commit syncs release-cross.nix with (new?) cross targets added to
lib.systems.examples in the meantime. We for example didn't have a
prebuilt toolchain for riscv64.
Our support for ppc64le is pretty good now.
Let's add these so it's easier to spot and rectify breakage.
The toolchains are already built for their bootstrap tools,
so this shouldn't put much build strain on hydra.
Instead of intersecting system strings, we filter with the sort of
patterns used in `meta.platforms`.
Indicating this change `forTheseSystems` has been renamed to
`forMatchingSystems`, since the given list is now patterns to match, and
not the systems themselves. [Just as with `meta.platforms`, systems
strings are also supported for backwards compatibility.]
This is more flexible, and makes the `forMatchingSystems` and
packagePlatforms` cases more analogous.