eachSystem: special case hydraJobs to match hydra convention. (#45)
This commit is contained in:
		
							parent
							
								
									7e5bf3925f
								
							
						
					
					
						commit
						c91f3de5ad
					
				| @ -60,8 +60,9 @@ let | |||||||
|   # eachSystem using defaultSystems |   # eachSystem using defaultSystems | ||||||
|   eachDefaultSystem = eachSystem defaultSystems; |   eachDefaultSystem = eachSystem defaultSystems; | ||||||
| 
 | 
 | ||||||
|   # Builds a map from <attr>=value to <attr>.<system>=value for each system. |   # Builds a map from <attr>=value to <attr>.<system>=value for each system, | ||||||
|   # |   # except for the `hydraJobs` attribute, where it maps the inner attributes, | ||||||
|  |   # from hydraJobs.<attr>=value to hydraJobs.<attr>.<system>=value. | ||||||
|   # |   # | ||||||
|   eachSystem = systems: f: |   eachSystem = systems: f: | ||||||
|     let |     let | ||||||
| @ -71,7 +72,9 @@ let | |||||||
|           op = attrs: key: |           op = attrs: key: | ||||||
|             attrs // |             attrs // | ||||||
|             { |             { | ||||||
|               ${key} = (attrs.${key} or { }) // { ${system} = ret.${key}; }; |               ${key} = (attrs.${key} or { }) // (if key == "hydraJobs" | ||||||
|  |               then builtins.mapAttrs (name: value: (attrs.hydraJobs.${name} or { }) // { ${system} = value; }) ret.hydraJobs | ||||||
|  |               else { ${system} = ret.${key}; }); | ||||||
|             } |             } | ||||||
|           ; |           ; | ||||||
|         in |         in | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user