rtorrent: 0.9.8-unstable -> 0.10.0 (#345364)
[NixPkgs.git] / pkgs / top-level / release.nix
blob0f5974d83cb84581108381d63f25fda54b520199
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 , system ? builtins.currentSystem
13 , officialRelease ? false
14   # The platform doubles for which we build Nixpkgs.
15 , supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]
16   # The platform triples for which we build bootstrap tools.
17 , bootstrapConfigs ? [
18     "aarch64-apple-darwin"
19     "aarch64-unknown-linux-gnu"
20     "aarch64-unknown-linux-musl"
21     "i686-unknown-linux-gnu"
22     "x86_64-apple-darwin"
23     "x86_64-unknown-linux-gnu"
24     "x86_64-unknown-linux-musl"
25     # we can uncomment that once our bootstrap tarballs are fixed
26     #"x86_64-unknown-freebsd"
27   ]
28   # Strip most of attributes when evaluating to spare memory usage
29 , scrubJobs ? true
30   # Attributes passed to nixpkgs. Don't build packages marked as unfree.
31 , nixpkgsArgs ? { config = {
32     allowUnfree = false;
33     inHydra = true;
34   }; }
36   # This flag, if set to true, will inhibit the use of `mapTestOn`
37   # and `release-lib.packagePlatforms`.  Generally, it causes the
38   # resulting tree of attributes to *not* have a ".${system}"
39   # suffixed upon every job name like Hydra expects.
40   #
41   # This flag exists mainly for use by
42   # pkgs/top-level/release-attrnames-superset.nix; see that file for
43   # full details.  The exact behavior of this flag may change; it
44   # should be considered an internal implementation detail of
45   # pkgs/top-level/.
46   #
47 , attrNamesOnly ? false
50 let
51   release-lib = import ./release-lib.nix {
52     inherit supportedSystems scrubJobs nixpkgsArgs system;
53   };
55   inherit (release-lib) mapTestOn pkgs;
57   inherit (release-lib.lib)
58     collect
59     elem
60     genAttrs
61     hasInfix
62     hasSuffix
63     id
64     isDerivation
65     optionals
66     ;
68   inherit (release-lib.lib.attrsets) unionOfDisjoint;
70   supportDarwin = genAttrs [
71     "x86_64"
72     "aarch64"
73   ] (arch: elem "${arch}-darwin" supportedSystems);
75   nonPackageJobs =
76     { tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease; };
78       release-checks = import ./nixpkgs-basic-release-checks.nix { inherit pkgs nixpkgs supportedSystems; };
80       manual = pkgs.nixpkgs-manual.override { inherit nixpkgs; };
81       metrics = import ./metrics.nix { inherit pkgs nixpkgs; };
82       lib-tests = import ../../lib/tests/release.nix { inherit pkgs; };
83       pkgs-lib-tests = import ../pkgs-lib/tests { inherit pkgs; };
85       darwin-tested = if supportDarwin.x86_64 then pkgs.releaseTools.aggregate
86         { name = "nixpkgs-darwin-${jobs.tarball.version}";
87           meta.description = "Release-critical builds for the Nixpkgs darwin channel";
88           constituents =
89             [ jobs.tarball
90               jobs.release-checks
91               jobs.cabal2nix.x86_64-darwin
92               jobs.ghc.x86_64-darwin
93               jobs.git.x86_64-darwin
94               jobs.go.x86_64-darwin
95               jobs.mariadb.x86_64-darwin
96               jobs.nix.x86_64-darwin
97               jobs.nixpkgs-review.x86_64-darwin
98               jobs.nix-info.x86_64-darwin
99               jobs.nix-info-tested.x86_64-darwin
100               jobs.openssh.x86_64-darwin
101               jobs.openssl.x86_64-darwin
102               jobs.pandoc.x86_64-darwin
103               jobs.postgresql.x86_64-darwin
104               jobs.python3.x86_64-darwin
105               jobs.ruby.x86_64-darwin
106               jobs.rustc.x86_64-darwin
107               # blocking ofBorg CI 2020-02-28
108               # jobs.stack.x86_64-darwin
109               jobs.stdenv.x86_64-darwin
110               jobs.vim.x86_64-darwin
111               jobs.cachix.x86_64-darwin
112               jobs.darwin.linux-builder.x86_64-darwin
114               # UI apps
115               # jobs.firefox-unwrapped.x86_64-darwin
116               jobs.qt5.qtmultimedia.x86_64-darwin
117               jobs.inkscape.x86_64-darwin
118               jobs.gimp.x86_64-darwin
119               jobs.emacs.x86_64-darwin
120               jobs.wireshark.x86_64-darwin
121               jobs.transmission_3-gtk.x86_64-darwin
122               jobs.transmission_4-gtk.x86_64-darwin
124               # Tests
125               /*
126               jobs.tests.cc-wrapper.default.x86_64-darwin
127               jobs.tests.cc-wrapper.llvmPackages.clang.x86_64-darwin
128               jobs.tests.cc-wrapper.llvmPackages.libcxx.x86_64-darwin
129               jobs.tests.stdenv-inputs.x86_64-darwin
130               jobs.tests.macOSSierraShared.x86_64-darwin
131               jobs.tests.stdenv.hooks.patch-shebangs.x86_64-darwin
132               */
133             ];
134         } else null;
136       unstable = pkgs.releaseTools.aggregate
137         { name = "nixpkgs-${jobs.tarball.version}";
138           meta.description = "Release-critical builds for the Nixpkgs unstable channel";
139           constituents =
140             [ jobs.tarball
141               jobs.release-checks
142               jobs.metrics
143               jobs.manual
144               jobs.lib-tests
145               jobs.pkgs-lib-tests
146               jobs.stdenv.x86_64-linux
147               jobs.cargo.x86_64-linux
148               jobs.go.x86_64-linux
149               jobs.linux.x86_64-linux
150               jobs.nix.x86_64-linux
151               jobs.pandoc.x86_64-linux
152               jobs.python3.x86_64-linux
153               # Needed by contributors to test PRs (by inclusion of the PR template)
154               jobs.nixpkgs-review.x86_64-linux
155               # Needed for support
156               jobs.nix-info.x86_64-linux
157               jobs.nix-info-tested.x86_64-linux
158               # Ensure that X11/GTK are in order.
159               jobs.firefox-unwrapped.x86_64-linux
160               jobs.cachix.x86_64-linux
161               jobs.devenv.x86_64-linux
163               /*
164               TODO: re-add tests; context: https://github.com/NixOS/nixpkgs/commit/36587a587ab191eddd868179d63c82cdd5dee21b
166               jobs.tests.cc-wrapper.default.x86_64-linux
167               jobs.tests.cc-wrapper.gcc7Stdenv.x86_64-linux
168               jobs.tests.cc-wrapper.gcc8Stdenv.x86_64-linux
170               # broken see issue #40038
172               jobs.tests.cc-wrapper.llvmPackages.clang.x86_64-linux
173               jobs.tests.cc-wrapper.llvmPackages.libcxx.x86_64-linux
174               jobs.tests.cc-multilib-gcc.x86_64-linux
175               jobs.tests.cc-multilib-clang.x86_64-linux
176               jobs.tests.stdenv-inputs.x86_64-linux
177               jobs.tests.stdenv.hooks.patch-shebangs.x86_64-linux
178               */
179             ]
180             ++ collect isDerivation jobs.stdenvBootstrapTools
181             ++ optionals supportDarwin.x86_64 [
182               jobs.stdenv.x86_64-darwin
183               jobs.cargo.x86_64-darwin
184               jobs.cachix.x86_64-darwin
185               jobs.devenv.x86_64-darwin
186               jobs.go.x86_64-darwin
187               jobs.python3.x86_64-darwin
188               jobs.nixpkgs-review.x86_64-darwin
189               jobs.nix.x86_64-darwin
190               jobs.nix-info.x86_64-darwin
191               jobs.nix-info-tested.x86_64-darwin
192               jobs.git.x86_64-darwin
193               jobs.mariadb.x86_64-darwin
194               jobs.vim.x86_64-darwin
195               jobs.inkscape.x86_64-darwin
196               jobs.qt5.qtmultimedia.x86_64-darwin
197               jobs.darwin.linux-builder.x86_64-darwin
198               /*
199               jobs.tests.cc-wrapper.default.x86_64-darwin
200               jobs.tests.cc-wrapper.gcc7Stdenv.x86_64-darwin
201               jobs.tests.cc-wrapper.gcc8Stdenv.x86_64-darwin
202               jobs.tests.cc-wrapper.llvmPackages.clang.x86_64-darwin
203               jobs.tests.cc-wrapper.llvmPackages.libcxx.x86_64-darwin
204               jobs.tests.stdenv-inputs.x86_64-darwin
205               jobs.tests.macOSSierraShared.x86_64-darwin
206               jobs.tests.stdenv.hooks.patch-shebangs.x86_64-darwin
207               */
208             ]
209             ++ optionals supportDarwin.aarch64 [
210               jobs.stdenv.aarch64-darwin
211               jobs.cargo.aarch64-darwin
212               jobs.cachix.aarch64-darwin
213               jobs.devenv.aarch64-darwin
214               jobs.go.aarch64-darwin
215               jobs.python3.aarch64-darwin
216               jobs.nixpkgs-review.aarch64-darwin
217               jobs.nix.aarch64-darwin
218               jobs.nix-info.aarch64-darwin
219               jobs.nix-info-tested.aarch64-darwin
220               jobs.git.aarch64-darwin
221               jobs.mariadb.aarch64-darwin
222               jobs.vim.aarch64-darwin
223               jobs.inkscape.aarch64-darwin
224               jobs.qt5.qtmultimedia.aarch64-darwin
225               jobs.darwin.linux-builder.aarch64-darwin
226               /* consider adding tests, as suggested above for x86_64-darwin */
227             ];
228         };
230       stdenvBootstrapTools = genAttrs bootstrapConfigs (config:
231           if hasInfix "-linux-" config then
232             let
233               bootstrap = import ../stdenv/linux/make-bootstrap-tools.nix {
234                 pkgs = import ../.. {
235                   localSystem = { inherit config; };
236                 };
237               };
238             in {
239               inherit (bootstrap) build test;
240             }
241           else if hasSuffix "-darwin" config then
242             let
243               bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix {
244                 localSystem = { inherit config; };
245               };
246             in {
247               # Lightweight distribution and test
248               inherit (bootstrap) build test;
249               # Test a full stdenv bootstrap from the bootstrap tools definition
250               # TODO: Re-enable once the new bootstrap-tools are in place.
251               #inherit (bootstrap.test-pkgs) stdenv;
252             }
253           else if hasSuffix "-freebsd" config then
254             let
255               bootstrap = import ../stdenv/freebsd/make-bootstrap-tools.nix {
256                 pkgs = import ../.. {
257                   localSystem = { inherit config; };
258                 };
259               };
260             in {
261               inherit (bootstrap) build;  # test does't exist yet
262             }
263           else
264             abort "No bootstrap implementation for system: ${config}"
265         );
266     };
268   # Do not allow attribute collision between jobs inserted in
269   # 'nonPackageAttrs' and jobs pulled in from 'pkgs'.
270   # Conflicts usually cause silent job drops like in
271   #   https://github.com/NixOS/nixpkgs/pull/182058
272   jobs = let
273     packagePlatforms = if attrNamesOnly then id else release-lib.packagePlatforms;
274     packageJobs = {
275       haskell.compiler = packagePlatforms pkgs.haskell.compiler;
276       haskellPackages = packagePlatforms pkgs.haskellPackages;
277       # Build selected packages (HLS) for multiple Haskell compilers to rebuild
278       # the cache after a staging merge
279       haskell.packages = genAttrs [
280         # TODO: share this list between release.nix and release-haskell.nix
281         "ghc90"
282         "ghc92"
283         "ghc94"
284         "ghc96"
285         "ghc98"
286       ] (compilerName: {
287         inherit (packagePlatforms pkgs.haskell.packages.${compilerName})
288           haskell-language-server;
289       });
290       idrisPackages = packagePlatforms pkgs.idrisPackages;
291       agdaPackages = packagePlatforms pkgs.agdaPackages;
293       pkgsLLVM.stdenv = [ "x86_64-linux" "aarch64-linux" ];
294       pkgsArocc.stdenv = [ "x86_64-linux" "aarch64-linux" ];
295       pkgsZig.stdenv = [ "x86_64-linux" "aarch64-linux" ];
296       pkgsMusl.stdenv = [ "x86_64-linux" "aarch64-linux" ];
297       pkgsStatic.stdenv = [ "x86_64-linux" "aarch64-linux" ];
299       tests = packagePlatforms pkgs.tests;
301       # Language packages disabled in https://github.com/NixOS/nixpkgs/commit/ccd1029f58a3bb9eca32d81bf3f33cb4be25cc66
303       #emacsPackages = packagePlatforms pkgs.emacsPackages;
304       #rPackages = packagePlatforms pkgs.rPackages;
305       ocamlPackages = { };
306       perlPackages = { };
308       darwin = packagePlatforms pkgs.darwin // {
309         xcode = {};
310       };
311     };
312     mapTestOn-packages =
313       if attrNamesOnly
314       then pkgs // packageJobs
315       else mapTestOn ((packagePlatforms pkgs) // packageJobs);
316   in
317     unionOfDisjoint nonPackageJobs mapTestOn-packages;
319 in jobs