at 24.11-pre 63 lines 2.2 kB view raw
1/* 2 test for example like this 3 $ hydra-eval-jobs pkgs/top-level/release-python.nix 4*/ 5 6{ # The platforms for which we build Nixpkgs. 7 supportedSystems ? [ 8 "aarch64-linux" 9 "x86_64-linux" 10 ] 11, # Attributes passed to nixpkgs. Don't build packages marked as unfree. 12 nixpkgsArgs ? { config = { 13 allowUnfree = false; 14 inHydra = true; 15 permittedInsecurePackages = [ 16 # Keep evaluating home-assistant, which is transitively affected 17 # by home-assistant-chip-core consuming OpenSSL 1.1. Affects roughly 18 # 800 jobs. 19 "openssl-1.1.1w" 20 ]; 21 }; } 22}: 23 24let 25 release-lib = import ./release-lib.nix { 26 inherit supportedSystems nixpkgsArgs; 27 }; 28 29 inherit (release-lib) mapTestOn pkgs; 30 31 inherit (release-lib.lib) isDerivation mapAttrs optionals; 32 33 packagePython = mapAttrs (name: value: 34 let res = builtins.tryEval ( 35 if isDerivation value then 36 value.meta.isBuildPythonPackage or [] 37 else if value.recurseForDerivations or false || value.recurseForRelease or false || value.__recurseIntoDerivationForReleaseJobs or false then 38 packagePython value 39 else 40 []); 41 in optionals res.success res.value 42 ); 43 44 jobs = { 45 lib-tests = import ../../lib/tests/release.nix { inherit pkgs; }; 46 pkgs-lib-tests = import ../pkgs-lib/tests { inherit pkgs; }; 47 48 tested = pkgs.releaseTools.aggregate { 49 name = "python-tested"; 50 meta.description = "Release-critical packages from the python package sets"; 51 constituents = [ 52 jobs.nixos-render-docs.x86_64-linux # Used in nixos manual 53 jobs.remarshal.x86_64-linux # Used in pkgs.formats helper 54 jobs.python311Packages.buildcatrust.x86_64-linux # Used in pkgs.cacert 55 jobs.python311Packages.colorama.x86_64-linux # Used in nixos test-driver 56 jobs.python311Packages.ptpython.x86_64-linux # Used in nixos test-driver 57 jobs.python311Packages.requests.x86_64-linux # Almost ubiquous package 58 jobs.python311Packages.sphinx.x86_64-linux # Document creation for many packages 59 ]; 60 }; 61 62 } // (mapTestOn (packagePython pkgs)); 63in jobs