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}:
20
21let
22 release-lib = import ./release-lib.nix {
23 inherit supportedSystems nixpkgsArgs;
24 };
25
26 inherit (release-lib) mapTestOn pkgs;
27
28 inherit (release-lib.lib) isDerivation mapAttrs optionals;
29
30 packagePython = mapAttrs (
31 name: value:
32 let
33 res = builtins.tryEval (
34 if isDerivation value then
35 value.meta.isBuildPythonPackage or [ ]
36 else if
37 value.recurseForDerivations or false
38 || value.recurseForRelease or false
39 || value.__recurseIntoDerivationForReleaseJobs or false
40 then
41 packagePython value
42 else
43 [ ]
44 );
45 in
46 optionals res.success res.value
47 );
48
49 jobs = {
50 lib-tests = import ../../lib/tests/release.nix { inherit pkgs; };
51 pkgs-lib-tests = import ../pkgs-lib/tests { inherit pkgs; };
52
53 tested = pkgs.releaseTools.aggregate {
54 name = "python-tested";
55 meta.description = "Release-critical packages from the python package sets";
56 constituents = [
57 jobs.nixos-render-docs.x86_64-linux # Used in nixos manual
58 jobs.remarshal.x86_64-linux # Used in pkgs.formats helper
59 jobs.python312Packages.afdko.x86_64-linux # Used in noto-fonts-color-emoji
60 jobs.python312Packages.buildcatrust.x86_64-linux # Used in pkgs.cacert
61 jobs.python312Packages.colorama.x86_64-linux # Used in nixos test-driver
62 jobs.python312Packages.ptpython.x86_64-linux # Used in nixos test-driver
63 jobs.python312Packages.requests.x86_64-linux # Almost ubiquous package
64 jobs.python312Packages.sphinx.x86_64-linux # Document creation for many packages
65 ];
66 };
67
68 } // (mapTestOn (packagePython pkgs));
69in
70jobs