release-lib: Fallback on uncached rather than error for unknown crossSystem

The `ensureUnaffected` the tests purposefully use an absurd crossSystem.
Also sheevaplug and pogoplug share the same config.
This commit is contained in:
John Ericson 2018-11-01 16:14:55 -04:00
parent 79c713bc14
commit 24e2bc18b6

View File

@ -61,13 +61,12 @@ rec {
}); });
native = mkPkgsFor null; native = mkPkgsFor null;
in crossSystem: let in crossSystem: let
errorMsg = "unsupported crossSystem: ${toString crossSystem.config or "<something without config>"}"; candidate = examplesByConfig.${crossSystem.config} or null;
candidate = examplesByConfig.${crossSystem.config} or (throw errorMsg);
in if crossSystem == null in if crossSystem == null
then native then native
else if lib.matchAttrs crossSystem candidate.crossSystem else if candidate != null && lib.matchAttrs crossSystem candidate.crossSystem
then candidate.pkgsFor then candidate.pkgsFor
else throw errorMsg; else mkPkgsFor crossSystem; # uncached fallback
# Given a list of 'meta.platforms'-style patterns, return the sublist of # Given a list of 'meta.platforms'-style patterns, return the sublist of