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 allowAliases = false;
16 allowUnfree = false;
17 inHydra = true;
18 };
19
20 __allowFileset = false;
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 (
34 name: value:
35 let
36 res = builtins.tryEval (
37 if isDerivation value then
38 value.meta.isBuildPythonPackage or [ ]
39 else if value.recurseForDerivations or false || value.recurseForRelease or false then
40 packagePython value
41 else
42 [ ]
43 );
44 in
45 optionals res.success res.value
46 );
47
48 jobs = {
49 # for pkgs.formats tests, which rely on remarshal
50 pkgs-lib-tests = import ../pkgs-lib/tests { inherit pkgs; };
51
52 tested = pkgs.releaseTools.aggregate {
53 name = "python-tested";
54 meta.description = "Release-critical packages from the python package sets";
55 constituents = [
56 jobs.nixos-render-docs.x86_64-linux # Used in nixos manual
57 jobs.remarshal_0_17.x86_64-linux # Used in pkgs.formats.yaml_1_1
58 jobs.python312Packages.afdko.x86_64-linux # Used in noto-fonts-color-emoji
59 jobs.python312Packages.buildcatrust.x86_64-linux # Used in pkgs.cacert
60 jobs.python312Packages.colorama.x86_64-linux # Used in nixos test-driver
61 jobs.python312Packages.ptpython.x86_64-linux # Used in nixos test-driver
62 jobs.python312Packages.requests.x86_64-linux # Almost ubiquous package
63 jobs.python312Packages.sphinx.x86_64-linux # Document creation for many packages
64 ];
65 };
66
67 }
68 // (mapTestOn (packagePython pkgs));
69in
70jobs