···154154155155 //
156156157157- (if buildOutOfSourceTree
158158- then {
157157+ (lib.optionalAttrs buildOutOfSourceTree
158158+ {
159159 preConfigure =
160160 # Build out of source tree and make the source tree read-only. This
161161 # helps catch violations of the GNU Coding Standards (info
···170170 ${lib.optionalString (preConfigure != null) preConfigure}
171171 '';
172172 }
173173- else {})
173173+ )
174174)
+3-3
pkgs/build-support/release/source-tarball.nix
···1010 if officialRelease
1111 then ""
1212 else "pre${toString (src.rev or src.revCount or "")}"
1313-, src, stdenv, autoconf, automake, libtool
1313+, src, lib, stdenv, autoconf, automake, libtool
1414, # By default, provide all the GNU Build System as input.
1515 bootstrapBuildInputs ? [ autoconf automake libtool ]
1616, ... } @ args:
···7373 }
74747575 # Then, the caller-supplied attributes.
7676- // args //
7676+ // (builtins.removeAttrs args [ "lib" ]) //
77777878 # And finally, our own stuff.
7979 {
···117117 version = version + versionSuffix;
118118 };
119119120120- meta = (if args ? meta then args.meta else {}) // {
120120+ meta = (lib.optionalAttrs (args ? meta) args.meta) // {
121121 description = "Source distribution";
122122123123 # Tarball builds are generally important, so give them a high
+11-12
pkgs/top-level/all-packages.nix
···1554515545 profiledCompiler = false;
15546155461554715547 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1554815548- threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "4.8" else { };
1554815548+ threadsCross = lib.optionalAttrs (stdenv.targetPlatform != stdenv.buildPlatform) (threadsCrossFor "4.8");
15549155491555015550 isl = if !stdenv.isDarwin then isl_0_14 else null;
1555115551 cloog = if !stdenv.isDarwin then cloog else null;
···1555915559 profiledCompiler = false;
15560155601556115561 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1556215562- threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "4.9" else { };
1556215562+ threadsCross = lib.optionalAttrs (stdenv.targetPlatform != stdenv.buildPlatform) (threadsCrossFor "4.9");
15563155631556415564 isl = if !stdenv.isDarwin then isl_0_11 else null;
1556515565···1557615576 profiledCompiler = false;
15577155771557815578 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1557915579- threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "6" else { };
1557915579+ threadsCross = lib.optionalAttrs (stdenv.targetPlatform != stdenv.buildPlatform) (threadsCrossFor "6");
15580155801558115581 # gcc 10 is too strict to cross compile gcc <= 8
1558215582 stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv;
···1559515595 profiledCompiler = false;
15596155961559715597 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1559815598- threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "7" else { };
1559815598+ threadsCross = lib.optionalAttrs (stdenv.targetPlatform != stdenv.buildPlatform) (threadsCrossFor "7");
15599155991560015600 # gcc 10 is too strict to cross compile gcc <= 8
1560115601 stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv;
···1561015610 profiledCompiler = false;
15611156111561215612 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1561315613- threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "8" else { };
1561315613+ threadsCross = lib.optionalAttrs (stdenv.targetPlatform != stdenv.buildPlatform) (threadsCrossFor "8");
15614156141561515615 # gcc 10 is too strict to cross compile gcc <= 8
1561615616 stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv;
···1562515625 profiledCompiler = false;
15626156261562715627 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1562815628- threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "9" else { };
1562815628+ threadsCross = lib.optionalAttrs (stdenv.targetPlatform != stdenv.buildPlatform) (threadsCrossFor "9");
15629156291563015630 isl = if !stdenv.isDarwin then isl_0_20 else null;
1563115631 }));
···1563715637 profiledCompiler = false;
15638156381563915639 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1564015640- threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "10" else { };
1564015640+ threadsCross = lib.optionalAttrs (stdenv.targetPlatform != stdenv.buildPlatform) (threadsCrossFor "10");
15641156411564215642 isl = if !stdenv.isDarwin then isl_0_20 else null;
1564315643 }));
···1564915649 profiledCompiler = false;
15650156501565115651 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1565215652- threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "11" else { };
1565215652+ threadsCross = lib.optionalAttrs (stdenv.targetPlatform != stdenv.buildPlatform) (threadsCrossFor "11");
15653156531565415654 isl = if !stdenv.isDarwin then isl_0_20 else null;
1565515655 }));
···1566115661 profiledCompiler = false;
15662156621566315663 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1566415664- threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "12" else { };
1566415664+ threadsCross = lib.optionalAttrs (stdenv.targetPlatform != stdenv.buildPlatform) (threadsCrossFor "12");
15665156651566615666 isl = if !stdenv.isDarwin then isl_0_20 else null;
1566715667 }));
···21340213402134121341 threadsCross = threadsCrossFor null;
2134221342 threadsCrossFor = cc_version:
2134321343- if stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false)
2134421344- then {
2134321343+ lib.optionalAttrs (stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false)) {
2134521344 # other possible values: win32 or posix
2134621345 model = "mcf";
2134721346 # For win32 or posix set this to null
···2134921348 if cc_version == null || lib.versionAtLeast cc_version "13"
2135021349 then targetPackages.windows.mcfgthreads or windows.mcfgthreads
2135121350 else targetPackages.windows.mcfgthreads_pre_gcc_13 or windows.mcfgthreads_pre_gcc_13;
2135221352- } else { };
2135121351+ };
21353213522135421353 wasilibc = callPackage ../development/libraries/wasilibc {
2135521354 stdenv = crossLibcStdenv;