forked from rarias/bscpkgs
		
	Add hydraJobs with tests and packages
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es> Tested-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
This commit is contained in:
		
							parent
							
								
									c7b5ec13b8
								
							
						
					
					
						commit
						2ffdd53d86
					
				
							
								
								
									
										10
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								flake.nix
									
									
									
									
									
								
							| @ -3,16 +3,22 @@ | |||||||
| 
 | 
 | ||||||
|   outputs = { self, nixpkgs, ...}: |   outputs = { self, nixpkgs, ...}: | ||||||
|     let |     let | ||||||
|     pkgs = import nixpkgs { |  | ||||||
|       # For now we only support x86 |       # For now we only support x86 | ||||||
|       system = "x86_64-linux"; |       system = "x86_64-linux"; | ||||||
|  |       pkgs = import nixpkgs { | ||||||
|  |         inherit system; | ||||||
|         overlays = [ self.overlays.default ]; |         overlays = [ self.overlays.default ]; | ||||||
|       }; |       }; | ||||||
|     in |     in | ||||||
|     { |     { | ||||||
|       bscOverlay = import ./overlay.nix; |       bscOverlay = import ./overlay.nix; | ||||||
|       overlays.default = self.bscOverlay; |       overlays.default = self.bscOverlay; | ||||||
|       legacyPackages.x86_64-linux = pkgs; |       # full nixpkgs with our overlay applied | ||||||
|  |       legacyPackages.${system} = pkgs; | ||||||
|  | 
 | ||||||
|  |       hydraJobs = { | ||||||
|  |         inherit (self.legacyPackages.${system}.bsc-ci) test pkgs; | ||||||
|  |       }; | ||||||
| 
 | 
 | ||||||
|       # propagate nixpkgs lib, so we can do bscpkgs.lib |       # propagate nixpkgs lib, so we can do bscpkgs.lib | ||||||
|       inherit (nixpkgs) lib; |       inherit (nixpkgs) lib; | ||||||
|  | |||||||
| @ -88,7 +88,9 @@ in bscPkgs // { | |||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     pkgs = final.runCommand "ci-pkgs" { } |     pkgs = filterAttrs (_: isDerivation) bscPkgs; | ||||||
|  | 
 | ||||||
|  |     pkgsList = final.runCommand "ci-pkgs" { } | ||||||
|       "printf '%s\n' ${toString (collect isDerivation bscPkgs)} > $out"; |       "printf '%s\n' ${toString (collect isDerivation bscPkgs)} > $out"; | ||||||
| 
 | 
 | ||||||
|     tests = final.runCommand "ci-tests" { } |     tests = final.runCommand "ci-tests" { } | ||||||
| @ -96,7 +98,7 @@ in bscPkgs // { | |||||||
| 
 | 
 | ||||||
|     all = final.runCommand "ci-all" { } |     all = final.runCommand "ci-all" { } | ||||||
|     '' |     '' | ||||||
|       deps="${toString [ final.bsc-ci.pkgs final.bsc-ci.tests ]}" |       deps="${toString [ final.bsc-ci.pkgsList final.bsc-ci.tests ]}" | ||||||
|       cat $deps |       cat $deps | ||||||
|       printf '%s\n' $deps > $out |       printf '%s\n' $deps > $out | ||||||
|     ''; |     ''; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user