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