diff --git a/pkgs/by-name/me/meson/setup-hook.sh b/pkgs/by-name/me/meson/setup-hook.sh index b2061a12058c..1885265eabbf 100644 --- a/pkgs/by-name/me/meson/setup-hook.sh +++ b/pkgs/by-name/me/meson/setup-hook.sh @@ -58,6 +58,14 @@ mesonCheckPhase() { flagsArray+=("--timeout-multiplier=0") fi + # Parallel building is enabled by default. + local buildCores=1 + if [ "${enableParallelBuilding-1}" ]; then + buildCores="$NIX_BUILD_CORES" + fi + + TERM=dumb ninja -j"$buildCores" $ninjaFlags "${ninjaFlagsArray[@]}" meson-test-prereq + echoCmd 'mesonCheckPhase flags' "${flagsArray[@]}" meson test --no-rebuild --print-errorlogs "${flagsArray[@]}"