diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index 2b72de7c7ef5..ac11de698b56 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