release-lib: build packages without meta.platforms on all platforms

This was added in <https://github.com/NixOS/nixpkgs/pull/19990> to
ensure that packages that previously weren’t building at all would
get at least one platform’s worth of coverage. However, since most
`runCommand` calls don’t explicitly set any `meta` information,
this meant that things like `tests.makeWrapper` were only being
run for `x86_64-linux`. Since most trivial builder calls should
work on all platforms, it doesn’t make much sense for them to be
restricted in this way, and we shouldn’t unnecessarily penalize
other platforms by treating an empty `meta.platforms` inconsistently
with `check-meta`’s maximally‐permissive interpretation. Actual
packages that only work on a subset of platforms should, of course,
set `meta.platforms` explicitly.
This commit is contained in:
Emily 2024-10-28 15:47:57 +00:00
parent bf054e513b
commit f28cc72d5d

View File

@ -169,7 +169,7 @@ let
if isDerivation value then
value.meta.hydraPlatforms
or (subtractLists (value.meta.badPlatforms or [])
(value.meta.platforms or [ "x86_64-linux" ]))
(value.meta.platforms or supportedSystems))
else if value.recurseForDerivations or false || value.recurseForRelease or false then
packagePlatforms value
else