···228228 '';
229229230230 buildPhase = let
231231+ # Build paralelism: on Hydra the build was frequently running into memory
232232+ # exhaustion, and even other users might be running into similar issues.
233233+ # -j is halved to avoid memory problems, and -l is slightly increased
234234+ # so that the build gets slight preference before others
235235+ # (it will often be on "critical path" and at risk of timing out)
231236 buildCommand = target: ''
232237 ninja -C "${buildPath}" \
233233- -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \
238238+ -j$(( ($NIX_BUILD_CORES+1) / 2 )) -l$(( $NIX_BUILD_CORES+1 )) \
234239 "${target}"
235240 '' + optionalString (target == "mksnapshot" || target == "chrome") ''
236241 paxmark m "${buildPath}/${target}"