release-lib: Adapt to work with new meta.platforms
`packagePlatforms` now filters `supportedSystems` with the new-style `meta.platforms`, rather than just plopping it in as is.
This commit is contained in:
parent
c26252af3e
commit
eae19f3c28
@ -98,7 +98,18 @@ rec {
|
|||||||
packagePlatforms = mapAttrs (name: value:
|
packagePlatforms = mapAttrs (name: value:
|
||||||
let res = builtins.tryEval (
|
let res = builtins.tryEval (
|
||||||
if isDerivation value then
|
if isDerivation value then
|
||||||
value.meta.hydraPlatforms or (value.meta.platforms or [ "x86_64-linux" ])
|
# TODO(@Ericson2314) deduplicate with `checkPlatform` in
|
||||||
|
# `pkgs/stdenv/generic/check-meta.nix`.
|
||||||
|
value.meta.hydraPlatforms or (let
|
||||||
|
raw = value.meta.platforms or [ "x86_64-linux" ];
|
||||||
|
toPattern = x: if builtins.isString x
|
||||||
|
then { system = x; }
|
||||||
|
else { parsed = x; };
|
||||||
|
uniform = map toPattern raw;
|
||||||
|
pred = hostPlatform:
|
||||||
|
lib.any (pat: lib.matchAttrs pat hostPlatform) uniform;
|
||||||
|
pred' = system: pred (lib.systems.elaborate { inherit system; });
|
||||||
|
in lib.filter pred' supportedSystems)
|
||||||
else if value.recurseForDerivations or false || value.recurseForRelease or false then
|
else if value.recurseForDerivations or false || value.recurseForRelease or false then
|
||||||
packagePlatforms value
|
packagePlatforms value
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user