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:
4
5 $ nix-build pkgs/top-level/release.nix -A <jobname>.<system>
6
7 e.g.
8
9 $ nix-build pkgs/top-level/release.nix -A coreutils.x86_64-linux
10*/
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 "openssl-1.1.1w"
38 ];
39 }; }
40}:
41
42with import ./release-lib.nix { inherit supportedSystems scrubJobs nixpkgsArgs; };
43
44let
45
46 supportDarwin = lib.genAttrs [
47 "x86_64"
48 "aarch64"
49 ] (arch: builtins.elem "${arch}-darwin" supportedSystems);
50
51 nonPackageJobs =
52 { tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease supportedSystems; };
53
54 metrics = import ./metrics.nix { inherit pkgs nixpkgs; };
55
56 manual = import ../../doc { inherit pkgs nixpkgs; };
57 lib-tests = import ../../lib/tests/release.nix { inherit pkgs; };
58 pkgs-lib-tests = import ../pkgs-lib/tests { inherit pkgs; };
59
60 darwin-tested = if supportDarwin.x86_64 then pkgs.releaseTools.aggregate
61 { name = "nixpkgs-darwin-${jobs.tarball.version}";
62 meta.description = "Release-critical builds for the Nixpkgs darwin channel";
63 constituents =
64 [ jobs.tarball
65 jobs.cabal2nix.x86_64-darwin
66 jobs.ghc.x86_64-darwin
67 jobs.git.x86_64-darwin
68 jobs.go.x86_64-darwin
69 jobs.mariadb.x86_64-darwin
70 jobs.nix.x86_64-darwin
71 jobs.nixpkgs-review.x86_64-darwin
72 jobs.nix-info.x86_64-darwin
73 jobs.nix-info-tested.x86_64-darwin
74 jobs.openssh.x86_64-darwin
75 jobs.openssl.x86_64-darwin
76 jobs.pandoc.x86_64-darwin
77 jobs.postgresql.x86_64-darwin
78 jobs.python3.x86_64-darwin
79 jobs.ruby.x86_64-darwin
80 jobs.rustc.x86_64-darwin
81 # blocking ofBorg CI 2020-02-28
82 # jobs.stack.x86_64-darwin
83 jobs.stdenv.x86_64-darwin
84 jobs.vim.x86_64-darwin
85 jobs.cachix.x86_64-darwin
86 jobs.darwin.linux-builder.x86_64-darwin
87
88 # UI apps
89 # jobs.firefox-unwrapped.x86_64-darwin
90 jobs.qt5.qtmultimedia.x86_64-darwin
91 jobs.inkscape.x86_64-darwin
92 jobs.gimp.x86_64-darwin
93 jobs.emacs.x86_64-darwin
94 jobs.wireshark.x86_64-darwin
95 jobs.transmission-gtk.x86_64-darwin
96
97 # Tests
98 /*
99 jobs.tests.cc-wrapper.default.x86_64-darwin
100 jobs.tests.cc-wrapper.llvmPackages.clang.x86_64-darwin
101 jobs.tests.cc-wrapper.llvmPackages.libcxx.x86_64-darwin
102 jobs.tests.stdenv-inputs.x86_64-darwin
103 jobs.tests.macOSSierraShared.x86_64-darwin
104 jobs.tests.stdenv.hooks.patch-shebangs.x86_64-darwin
105 */
106 ];
107 } else null;
108
109 unstable = pkgs.releaseTools.aggregate
110 { name = "nixpkgs-${jobs.tarball.version}";
111 meta.description = "Release-critical builds for the Nixpkgs unstable channel";
112 constituents =
113 [ jobs.tarball
114 jobs.metrics
115 jobs.manual
116 jobs.lib-tests
117 jobs.pkgs-lib-tests
118 jobs.stdenv.x86_64-linux
119 jobs.cargo.x86_64-linux
120 jobs.go.x86_64-linux
121 jobs.linux.x86_64-linux
122 jobs.nix.x86_64-linux
123 jobs.pandoc.x86_64-linux
124 jobs.python3.x86_64-linux
125 # Needed by contributors to test PRs (by inclusion of the PR template)
126 jobs.nixpkgs-review.x86_64-linux
127 # Needed for support
128 jobs.nix-info.x86_64-linux
129 jobs.nix-info-tested.x86_64-linux
130 # Ensure that X11/GTK are in order.
131 jobs.firefox-unwrapped.x86_64-linux
132 jobs.cachix.x86_64-linux
133
134 /*
135 TODO: re-add tests; context: https://github.com/NixOS/nixpkgs/commit/36587a587ab191eddd868179d63c82cdd5dee21b
136
137 jobs.tests.cc-wrapper.default.x86_64-linux
138 jobs.tests.cc-wrapper.gcc7Stdenv.x86_64-linux
139 jobs.tests.cc-wrapper.gcc8Stdenv.x86_64-linux
140
141 # broken see issue #40038
142
143 jobs.tests.cc-wrapper.llvmPackages.clang.x86_64-linux
144 jobs.tests.cc-wrapper.llvmPackages.libcxx.x86_64-linux
145 jobs.tests.cc-wrapper.llvmPackages_6.clang.x86_64-linux
146 jobs.tests.cc-wrapper.llvmPackages_6.libcxx.x86_64-linux
147 jobs.tests.cc-wrapper.llvmPackages_7.clang.x86_64-linux
148 jobs.tests.cc-wrapper.llvmPackages_7.libcxx.x86_64-linux
149 jobs.tests.cc-wrapper.llvmPackages_7.clang.x86_64-linux
150 jobs.tests.cc-wrapper.llvmPackages_7.libcxx.x86_64-linux
151 jobs.tests.cc-multilib-gcc.x86_64-linux
152 jobs.tests.cc-multilib-clang.x86_64-linux
153 jobs.tests.stdenv-inputs.x86_64-linux
154 jobs.tests.stdenv.hooks.patch-shebangs.x86_64-linux
155 */
156 ]
157 ++ lib.collect lib.isDerivation jobs.stdenvBootstrapTools
158 ++ lib.optionals supportDarwin.x86_64 [
159 jobs.stdenv.x86_64-darwin
160 jobs.cargo.x86_64-darwin
161 jobs.cachix.x86_64-darwin
162 jobs.go.x86_64-darwin
163 jobs.python3.x86_64-darwin
164 jobs.nixpkgs-review.x86_64-darwin
165 jobs.nix.x86_64-darwin
166 jobs.nix-info.x86_64-darwin
167 jobs.nix-info-tested.x86_64-darwin
168 jobs.git.x86_64-darwin
169 jobs.mariadb.x86_64-darwin
170 jobs.vim.x86_64-darwin
171 jobs.inkscape.x86_64-darwin
172 jobs.qt5.qtmultimedia.x86_64-darwin
173 jobs.darwin.linux-builder.x86_64-darwin
174 /*
175 jobs.tests.cc-wrapper.default.x86_64-darwin
176 jobs.tests.cc-wrapper.gcc7Stdenv.x86_64-darwin
177 jobs.tests.cc-wrapper.gcc8Stdenv.x86_64-darwin
178 jobs.tests.cc-wrapper.llvmPackages.clang.x86_64-darwin
179 jobs.tests.cc-wrapper.llvmPackages.libcxx.x86_64-darwin
180 jobs.tests.cc-wrapper.llvmPackages_5.clang.x86_64-darwin
181 jobs.tests.cc-wrapper.llvmPackages_5.libcxx.x86_64-darwin
182 jobs.tests.cc-wrapper.llvmPackages_6.clang.x86_64-darwin
183 jobs.tests.cc-wrapper.llvmPackages_6.libcxx.x86_64-darwin
184 jobs.tests.stdenv-inputs.x86_64-darwin
185 jobs.tests.macOSSierraShared.x86_64-darwin
186 jobs.tests.stdenv.hooks.patch-shebangs.x86_64-darwin
187 */
188 ]
189 ++ lib.optionals supportDarwin.aarch64 [
190 jobs.stdenv.aarch64-darwin
191 jobs.cargo.aarch64-darwin
192 jobs.cachix.aarch64-darwin
193 jobs.go.aarch64-darwin
194 jobs.python3.aarch64-darwin
195 jobs.nixpkgs-review.aarch64-darwin
196 jobs.nix.aarch64-darwin
197 jobs.nix-info.aarch64-darwin
198 jobs.nix-info-tested.aarch64-darwin
199 jobs.git.aarch64-darwin
200 jobs.mariadb.aarch64-darwin
201 jobs.vim.aarch64-darwin
202 jobs.inkscape.aarch64-darwin
203 jobs.qt5.qtmultimedia.aarch64-darwin
204 jobs.darwin.linux-builder.aarch64-darwin
205 /* consider adding tests, as suggested above for x86_64-darwin */
206 ];
207 };
208
209 stdenvBootstrapTools = with lib;
210 genAttrs bootstrapConfigs (config:
211 if hasInfix "-linux-" config then
212 let
213 bootstrap = import ../stdenv/linux/make-bootstrap-tools.nix {
214 pkgs = import ../.. {
215 localSystem = { inherit config; };
216 };
217 };
218 in {
219 inherit (bootstrap) dist test;
220 }
221 else if hasSuffix "-darwin" config then
222 let
223 bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix {
224 localSystem = { inherit config; };
225 };
226 in {
227 # Lightweight distribution and test
228 inherit (bootstrap) dist test;
229 # Test a full stdenv bootstrap from the bootstrap tools definition
230 # TODO: Re-enable once the new bootstrap-tools are in place.
231 #inherit (bootstrap.test-pkgs) stdenv;
232 }
233 else
234 abort "No bootstrap implementation for system: ${config}"
235 );
236 };
237
238 # Do not allow attribute collision between jobs inserted in
239 # 'nonPackageAttrs' and jobs pulled in from 'pkgs'.
240 # Conflicts usually cause silent job drops like in
241 # https://github.com/NixOS/nixpkgs/pull/182058
242 jobs = lib.attrsets.unionOfDisjoint
243 nonPackageJobs
244 (mapTestOn ((packagePlatforms pkgs) // {
245 haskell.compiler = packagePlatforms pkgs.haskell.compiler;
246 haskellPackages = packagePlatforms pkgs.haskellPackages;
247 # Build selected packages (HLS) for multiple Haskell compilers to rebuild
248 # the cache after a staging merge
249 haskell.packages = lib.genAttrs [
250 # TODO: share this list between release.nix and release-haskell.nix
251 "ghc90"
252 "ghc92"
253 "ghc94"
254 "ghc96"
255 ] (compilerName: {
256 inherit (packagePlatforms pkgs.haskell.packages.${compilerName})
257 haskell-language-server;
258 });
259 idrisPackages = packagePlatforms pkgs.idrisPackages;
260 agdaPackages = packagePlatforms pkgs.agdaPackages;
261
262 pkgsLLVM.stdenv = [ "x86_64-linux" "aarch64-linux" ];
263 pkgsMusl.stdenv = [ "x86_64-linux" "aarch64-linux" ];
264 pkgsStatic.stdenv = [ "x86_64-linux" "aarch64-linux" ];
265
266 tests = packagePlatforms pkgs.tests;
267
268 # Language packages disabled in https://github.com/NixOS/nixpkgs/commit/ccd1029f58a3bb9eca32d81bf3f33cb4be25cc66
269
270 #emacsPackages = packagePlatforms pkgs.emacsPackages;
271 #rPackages = packagePlatforms pkgs.rPackages;
272 ocamlPackages = { };
273 perlPackages = { };
274
275 darwin = packagePlatforms pkgs.darwin // {
276 xcode = {};
277 };
278 } ));
279
280in jobs