This commit is contained in:
		
							
								
								
									
										43
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								flake.nix
									
									
									
									
									
								
							| @@ -52,31 +52,28 @@ | ||||
|               lib.lists.flatten (lib.mapAttrsToList (name: pkg: recursePackage name pkg) scope) | ||||
|             ); | ||||
|             workingPackages = lib.filterAttrs (_: pkg: !pkg.meta.broken) flatPackages; | ||||
|  | ||||
|             recursePackageSets = | ||||
|               pkg: | ||||
|               let | ||||
|                 isDrv = lib.isDerivation pkg; | ||||
|                 isAttrs = lib.isAttrs pkg; | ||||
|                 isSameSystem = lib.meta.availableOn pkgs.stdenv.hostPlatform pkg; | ||||
|               in | ||||
|               if isDrv && isSameSystem then | ||||
|                 pkg | ||||
|               else if isAttrs then | ||||
|                 lib.mapAttrs (_: subPkg: recursePackageSets subPkg) pkg | ||||
|               else | ||||
|                 null; | ||||
|  | ||||
|             # Recursively filter out nulls and remove overrides (probably a btter way to do this but it works for now) | ||||
|             packageSets = lib.filterAttrsRecursive (k: v: v != null && k != "override") ( | ||||
|               lib.mapAttrs (name: pkg: recursePackageSets pkg) scope | ||||
|             ); | ||||
|             # Disable for now | ||||
|             # recursePackageSets = | ||||
|             #   pkg: | ||||
|             #   let | ||||
|             #     isDrv = lib.isDerivation pkg; | ||||
|             #     isAttrs = lib.isAttrs pkg; | ||||
|             #     isSameSystem = lib.meta.availableOn pkgs.stdenv.hostPlatform pkg; | ||||
|             #   in | ||||
|             #   if isDrv && isSameSystem then | ||||
|             #     pkg | ||||
|             #   else if isAttrs then | ||||
|             #     lib.mapAttrs (_: subPkg: recursePackageSets subPkg) pkg | ||||
|             #   else | ||||
|             #     null; | ||||
|             # | ||||
|             # # Recursively filter out nulls and remove overrides (probably a btter way to do this but it works for now) | ||||
|             # packageSets = lib.filterAttrsRecursive (k: v: v != null && k != "override") ( | ||||
|             #   lib.mapAttrs (name: pkg: recursePackageSets pkg) scope | ||||
|             # ); | ||||
|           in | ||||
|           { | ||||
|             inherit packageSets; | ||||
|             inherit flatPackages; | ||||
|             inherit pkgs; | ||||
|             packages = packageSets; | ||||
|             packages = flatPackages; | ||||
|             checks = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") workingPackages; | ||||
|           } | ||||
|         ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user