release-cross.nix: fix the fix in #188339

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
This commit is contained in:
Adam Joseph 2023-05-06 23:19:49 -07:00
parent 78963777a4
commit 5838729f9e

View file

@ -242,8 +242,9 @@ in
# so it will fail unless buildPlatform.canExecute hostPlatform.
# Unfortunately `bootstrapTools` also clobbers its own `system`
# attribute, so there is no way to detect this -- we must add it
# as a special case.
(builtins.removeAttrs tools ["bootstrapTools"]);
# as a special case. We filter the "test" attribute (only from
# *cross*-built bootstrapTools) for the same reason.
(builtins.mapAttrs (_: v: builtins.removeAttrs v ["bootstrapTools" "test"]) tools);
# Cross-built nixStatic for platforms for enabled-but-unsupported platforms
mips64el-nixCrossStatic = mapTestOnCross lib.systems.examples.mips64el-linux-gnuabi64 nixCrossStatic;