diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-11-01 16:14:55 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-11-01 16:15:56 -0400 |
commit | 24e2bc18b6cd15a5d761048f5d3ec65b61d8fbd0 (patch) | |
tree | 3587d8fd5c61b943b54539de80bfbf80ce176e04 | |
parent | 79c713bc1498ccceed9f8d2fc0b8d29b1b45a209 (diff) | |
download | nixpkgs-24e2bc18b6cd15a5d761048f5d3ec65b61d8fbd0.tar nixpkgs-24e2bc18b6cd15a5d761048f5d3ec65b61d8fbd0.tar.gz nixpkgs-24e2bc18b6cd15a5d761048f5d3ec65b61d8fbd0.tar.bz2 nixpkgs-24e2bc18b6cd15a5d761048f5d3ec65b61d8fbd0.tar.lz nixpkgs-24e2bc18b6cd15a5d761048f5d3ec65b61d8fbd0.tar.xz nixpkgs-24e2bc18b6cd15a5d761048f5d3ec65b61d8fbd0.tar.zst nixpkgs-24e2bc18b6cd15a5d761048f5d3ec65b61d8fbd0.zip |
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.
-rw-r--r-- | pkgs/top-level/release-lib.nix | 7 |
1 files 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 "<something without config>"}"; - 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 |