From 24e2bc18b6cd15a5d761048f5d3ec65b61d8fbd0 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 1 Nov 2018 16:14:55 -0400 Subject: [PATCH] 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. --- pkgs/top-level/release-lib.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index 2b72de7c7ef..ac11de698b5 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -61,13 +61,12 @@ rec { }); native = mkPkgsFor null; in crossSystem: let - errorMsg = "unsupported crossSystem: ${toString crossSystem.config or ""}"; - candidate = examplesByConfig.${crossSystem.config} or (throw errorMsg); + candidate = examplesByConfig.${crossSystem.config} or null; in if crossSystem == null then native - else if lib.matchAttrs crossSystem candidate.crossSystem + else if candidate != null && lib.matchAttrs crossSystem candidate.crossSystem then candidate.pkgsFor - else throw errorMsg; + else mkPkgsFor crossSystem; # uncached fallback # Given a list of 'meta.platforms'-style patterns, return the sublist of