git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit24e2bc18b6cd15a5d761048f5d3ec65b61d8fbd0 authorJohn Ericson <John.Ericson@Obsidian.Systems> dateThu 1 Nov 2018, 16:14 (8 years ago) parent79c713b
1 file changed+3−4
pkgs/top-level/release-lib.nix+3−4
pkgs/top-level/release-lib.nix+3−4
@@ -61,13 +61,12 @@ rec {
6161 });
6262 native = mkPkgsFor null;
6363 in crossSystem: let
64− errorMsg = "unsupported crossSystem: ${toString crossSystem.config or "<something without config>"}";
65− candidate = examplesByConfig.${crossSystem.config} or (throw errorMsg);
64+ candidate = examplesByConfig.${crossSystem.config} or null;
6665 in if crossSystem == null
6766 then native
68− else if lib.matchAttrs crossSystem candidate.crossSystem
67+ else if candidate != null && lib.matchAttrs crossSystem candidate.crossSystem
6968 then candidate.pkgsFor
70− else throw errorMsg;
69+ else mkPkgsFor crossSystem; # uncached fallback
7170
7271
7372 # Given a list of 'meta.platforms'-style patterns, return the sublist of