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:
		
							parent
							
								
									79c713bc14
								
							
						
					
					
						commit
						24e2bc18b6
					
				@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user