Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / top-level / release.nix
bloba8e9f397c0bf32954048366bddd674bed9b36113
1 /* This file defines the builds that constitute the Nixpkgs.
2    Everything defined here ends up in the Nixpkgs channel.  Individual
3    jobs can be tested by running:
5    $ nix-build pkgs/top-level/release.nix -A <jobname>.<system>
7    e.g.
9    $ nix-build pkgs/top-level/release.nix -A coreutils.x86_64-linux
11 { nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; revision = "0000000000000000000000000000000000000000"; }
12 , officialRelease ? false
13   # The platform doubles for which we build Nixpkgs.
14 , supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]
15   # The platform triples for which we build bootstrap tools.
16 , bootstrapConfigs ? [
17     "aarch64-apple-darwin"
18     "aarch64-unknown-linux-gnu"
19     "aarch64-unknown-linux-musl"
20     "i686-unknown-linux-gnu"
21     "x86_64-apple-darwin"
22     "x86_64-unknown-linux-gnu"
23     "x86_64-unknown-linux-musl"
24   ]
25   # Strip most of attributes when evaluating to spare memory usage
26 , scrubJobs ? true
27   # Attributes passed to nixpkgs. Don't build packages marked as unfree.
28 , nixpkgsArgs ? { config = {
29     allowUnfree = false;
30     inHydra = true;
31     permittedInsecurePackages = [
32       # *Exceptionally*, those packages will be cached with their *secure* dependents
33       # because they will reach EOL in the middle of the 23.05 release
34       # and it will be too much painful for our users to recompile them
35       # for no real reason.
36       # Remove them for 23.11.
37       "nodejs-16.20.2"
38       "openssl-1.1.1w"
39     ];
40   }; }
43 with import ./release-lib.nix { inherit supportedSystems scrubJobs nixpkgsArgs; };
45 let
47   supportDarwin = lib.genAttrs [
48     "x86_64"
49     "aarch64"
50   ] (arch: builtins.elem "${arch}-darwin" supportedSystems);
52   nonPackageJobs =
53     { tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease supportedSystems; };
55       metrics = import ./metrics.nix { inherit pkgs nixpkgs; };
57       manual = import ../../doc { inherit pkgs nixpkgs; };
58       lib-tests = import ../../lib/tests/release.nix { inherit pkgs; };
59       pkgs-lib-tests = import ../pkgs-lib/tests { inherit pkgs; };
61       darwin-tested = if supportDarwin.x86_64 then pkgs.releaseTools.aggregate
62         { name = "nixpkgs-darwin-${jobs.tarball.version}";
63           meta.description = "Release-critical builds for the Nixpkgs darwin channel";
64           constituents =
65             [ jobs.tarball
66               jobs.cabal2nix.x86_64-darwin
67               jobs.ghc.x86_64-darwin
68               jobs.git.x86_64-darwin
69               jobs.go.x86_64-darwin
70               jobs.mariadb.x86_64-darwin
71               jobs.nix.x86_64-darwin
72               jobs.nixpkgs-review.x86_64-darwin
73               jobs.nix-info.x86_64-darwin
74               jobs.nix-info-tested.x86_64-darwin
75               jobs.openssh.x86_64-darwin
76               jobs.openssl.x86_64-darwin
77               jobs.pandoc.x86_64-darwin
78               jobs.postgresql.x86_64-darwin
79               jobs.python3.x86_64-darwin
80               jobs.ruby.x86_64-darwin
81               jobs.rustc.x86_64-darwin
82               # blocking ofBorg CI 2020-02-28
83               # jobs.stack.x86_64-darwin
84               jobs.stdenv.x86_64-darwin
85               jobs.vim.x86_64-darwin
86               jobs.cachix.x86_64-darwin
87               jobs.darwin.linux-builder.x86_64-darwin
89               # UI apps
90               # jobs.firefox-unwrapped.x86_64-darwin
91               jobs.qt5.qtmultimedia.x86_64-darwin
92               jobs.inkscape.x86_64-darwin
93               jobs.gimp.x86_64-darwin
94               jobs.emacs.x86_64-darwin
95               jobs.wireshark.x86_64-darwin
96               jobs.transmission-gtk.x86_64-darwin
98               # Tests
99               /*
100               jobs.tests.cc-wrapper.default.x86_64-darwin
101               jobs.tests.cc-wrapper.llvmPackages.clang.x86_64-darwin
102               jobs.tests.cc-wrapper.llvmPackages.libcxx.x86_64-darwin
103               jobs.tests.stdenv-inputs.x86_64-darwin
104               jobs.tests.macOSSierraShared.x86_64-darwin
105               jobs.tests.stdenv.hooks.patch-shebangs.x86_64-darwin
106               */
107             ];
108         } else null;
110       unstable = pkgs.releaseTools.aggregate
111         { name = "nixpkgs-${jobs.tarball.version}";
112           meta.description = "Release-critical builds for the Nixpkgs unstable channel";
113           constituents =
114             [ jobs.tarball
115               jobs.metrics
116               jobs.manual
117               jobs.lib-tests
118               jobs.pkgs-lib-tests
119               jobs.stdenv.x86_64-linux
120               jobs.cargo.x86_64-linux
121               jobs.go.x86_64-linux
122               jobs.linux.x86_64-linux
123               jobs.nix.x86_64-linux
124               jobs.pandoc.x86_64-linux
125               jobs.python3.x86_64-linux
126               # Needed by contributors to test PRs (by inclusion of the PR template)
127               jobs.nixpkgs-review.x86_64-linux
128               # Needed for support
129               jobs.nix-info.x86_64-linux
130               jobs.nix-info-tested.x86_64-linux
131               # Ensure that X11/GTK are in order.
132               jobs.firefox-unwrapped.x86_64-linux
133               jobs.cachix.x86_64-linux
135               /*
136               TODO: re-add tests; context: https://github.com/NixOS/nixpkgs/commit/36587a587ab191eddd868179d63c82cdd5dee21b
138               jobs.tests.cc-wrapper.default.x86_64-linux
139               jobs.tests.cc-wrapper.gcc7Stdenv.x86_64-linux
140               jobs.tests.cc-wrapper.gcc8Stdenv.x86_64-linux
142               # broken see issue #40038
144               jobs.tests.cc-wrapper.llvmPackages.clang.x86_64-linux
145               jobs.tests.cc-wrapper.llvmPackages.libcxx.x86_64-linux
146               jobs.tests.cc-wrapper.llvmPackages_6.clang.x86_64-linux
147               jobs.tests.cc-wrapper.llvmPackages_6.libcxx.x86_64-linux
148               jobs.tests.cc-wrapper.llvmPackages_7.clang.x86_64-linux
149               jobs.tests.cc-wrapper.llvmPackages_7.libcxx.x86_64-linux
150               jobs.tests.cc-wrapper.llvmPackages_7.clang.x86_64-linux
151               jobs.tests.cc-wrapper.llvmPackages_7.libcxx.x86_64-linux
152               jobs.tests.cc-multilib-gcc.x86_64-linux
153               jobs.tests.cc-multilib-clang.x86_64-linux
154               jobs.tests.stdenv-inputs.x86_64-linux
155               jobs.tests.stdenv.hooks.patch-shebangs.x86_64-linux
156               */
157             ]
158             ++ lib.collect lib.isDerivation jobs.stdenvBootstrapTools
159             ++ lib.optionals supportDarwin.x86_64 [
160               jobs.stdenv.x86_64-darwin
161               jobs.cargo.x86_64-darwin
162               jobs.cachix.x86_64-darwin
163               jobs.go.x86_64-darwin
164               jobs.python3.x86_64-darwin
165               jobs.nixpkgs-review.x86_64-darwin
166               jobs.nix.x86_64-darwin
167               jobs.nix-info.x86_64-darwin
168               jobs.nix-info-tested.x86_64-darwin
169               jobs.git.x86_64-darwin
170               jobs.mariadb.x86_64-darwin
171               jobs.vim.x86_64-darwin
172               jobs.inkscape.x86_64-darwin
173               jobs.qt5.qtmultimedia.x86_64-darwin
174               jobs.darwin.linux-builder.x86_64-darwin
175               /*
176               jobs.tests.cc-wrapper.default.x86_64-darwin
177               jobs.tests.cc-wrapper.gcc7Stdenv.x86_64-darwin
178               jobs.tests.cc-wrapper.gcc8Stdenv.x86_64-darwin
179               jobs.tests.cc-wrapper.llvmPackages.clang.x86_64-darwin
180               jobs.tests.cc-wrapper.llvmPackages.libcxx.x86_64-darwin
181               jobs.tests.cc-wrapper.llvmPackages_5.clang.x86_64-darwin
182               jobs.tests.cc-wrapper.llvmPackages_5.libcxx.x86_64-darwin
183               jobs.tests.cc-wrapper.llvmPackages_6.clang.x86_64-darwin
184               jobs.tests.cc-wrapper.llvmPackages_6.libcxx.x86_64-darwin
185               jobs.tests.stdenv-inputs.x86_64-darwin
186               jobs.tests.macOSSierraShared.x86_64-darwin
187               jobs.tests.stdenv.hooks.patch-shebangs.x86_64-darwin
188               */
189             ]
190             ++ lib.optionals supportDarwin.aarch64 [
191               jobs.stdenv.aarch64-darwin
192               jobs.cargo.aarch64-darwin
193               jobs.cachix.aarch64-darwin
194               jobs.go.aarch64-darwin
195               jobs.python3.aarch64-darwin
196               jobs.nixpkgs-review.aarch64-darwin
197               jobs.nix.aarch64-darwin
198               jobs.nix-info.aarch64-darwin
199               jobs.nix-info-tested.aarch64-darwin
200               jobs.git.aarch64-darwin
201               jobs.mariadb.aarch64-darwin
202               jobs.vim.aarch64-darwin
203               jobs.inkscape.aarch64-darwin
204               jobs.qt5.qtmultimedia.aarch64-darwin
205               jobs.darwin.linux-builder.aarch64-darwin
206               /* consider adding tests, as suggested above for x86_64-darwin */
207             ];
208         };
210       stdenvBootstrapTools = with lib;
211         genAttrs bootstrapConfigs (config:
212           if hasInfix "-linux-" config then
213             let
214               bootstrap = import ../stdenv/linux/make-bootstrap-tools.nix {
215                 pkgs = import ../.. {
216                   localSystem = { inherit config; };
217                 };
218               };
219             in {
220               inherit (bootstrap) dist test;
221             }
222           else if hasSuffix "-darwin" config then
223             let
224               bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix {
225                 localSystem = { inherit config; };
226               };
227             in {
228               # Lightweight distribution and test
229               inherit (bootstrap) dist test;
230               # Test a full stdenv bootstrap from the bootstrap tools definition
231               # TODO: Re-enable once the new bootstrap-tools are in place.
232               #inherit (bootstrap.test-pkgs) stdenv;
233             }
234           else
235             abort "No bootstrap implementation for system: ${config}"
236         );
237     };
239   # Do not allow attribute collision between jobs inserted in
240   # 'nonPackageAttrs' and jobs pulled in from 'pkgs'.
241   # Conflicts usually cause silent job drops like in
242   #   https://github.com/NixOS/nixpkgs/pull/182058
243   jobs = lib.attrsets.unionOfDisjoint
244     nonPackageJobs
245     (mapTestOn ((packagePlatforms pkgs) // {
246       haskell.compiler = packagePlatforms pkgs.haskell.compiler;
247       haskellPackages = packagePlatforms pkgs.haskellPackages;
248       # Build selected packages (HLS) for multiple Haskell compilers to rebuild
249       # the cache after a staging merge
250       haskell.packages = lib.genAttrs [
251         # TODO: share this list between release.nix and release-haskell.nix
252         "ghc90"
253         "ghc92"
254         "ghc94"
255         "ghc96"
256       ] (compilerName: {
257         inherit (packagePlatforms pkgs.haskell.packages.${compilerName})
258           haskell-language-server;
259       });
260       idrisPackages = packagePlatforms pkgs.idrisPackages;
261       agdaPackages = packagePlatforms pkgs.agdaPackages;
263       pkgsLLVM.stdenv = [ "x86_64-linux" "aarch64-linux" ];
264       pkgsMusl.stdenv = [ "x86_64-linux" "aarch64-linux" ];
265       pkgsStatic.stdenv = [ "x86_64-linux" "aarch64-linux" ];
267       tests = packagePlatforms pkgs.tests;
269       # Language packages disabled in https://github.com/NixOS/nixpkgs/commit/ccd1029f58a3bb9eca32d81bf3f33cb4be25cc66
271       #emacsPackages = packagePlatforms pkgs.emacsPackages;
272       #rPackages = packagePlatforms pkgs.rPackages;
273       ocamlPackages = { };
274       perlPackages = { };
276       darwin = packagePlatforms pkgs.darwin // {
277         xcode = {};
278       };
279     } ));
281 in jobs