diff --git a/pkgs/applications/audio/qsynth/default.nix b/pkgs/applications/audio/qsynth/default.nix index f9eaa890c57f..a24625ca7de8 100644 --- a/pkgs/applications/audio/qsynth/default.nix +++ b/pkgs/applications/audio/qsynth/default.nix @@ -16,6 +16,10 @@ mkDerivation rec { buildInputs = [ alsa-lib fluidsynth libjack2 qtbase qttools qtx11extras ]; enableParallelBuilding = true; + # Missing install depends: + # lrelease error: Parse error at src/translations/qsynth_ru.ts:1503:33: Premature end of document. + # make: *** [Makefile:107: src/translations/qsynth_ru.qm] Error 1 + enableParallelInstalling = false; meta = with lib; { description = "Fluidsynth GUI"; diff --git a/pkgs/applications/science/math/gretl/default.nix b/pkgs/applications/science/math/gretl/default.nix index 315433feb1c2..026be6fa1a4d 100644 --- a/pkgs/applications/science/math/gretl/default.nix +++ b/pkgs/applications/science/math/gretl/default.nix @@ -28,6 +28,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; enableParallelBuilding = true; + # Missing install depends: + # cp: cannot stat '...-gretl-2022c/share/gretl/data/plotbars': Not a directory + # make[1]: *** [Makefile:73: install_datafiles] Error 1 + enableParallelInstalling = false; meta = with lib; { description = "A software package for econometric analysis"; diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index 613872721d20..25e3983c2b0a 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -100,6 +100,10 @@ let inherit perlBindings pythonBindings; enableParallelBuilding = true; + # Missing install dependencies: + # libtool: error: error: relink 'libsvn_ra_serf-1.la' with the above command before installing it + # make: *** [build-outputs.mk:1316: install-serf-lib] Error 1 + enableParallelInstalling = false; nativeCheckInputs = [ python3 ]; doCheck = false; # fails 10 out of ~2300 tests diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix index 7797ec036d00..af07074eba1b 100644 --- a/pkgs/development/compilers/ocaml/generic.nix +++ b/pkgs/development/compilers/ocaml/generic.nix @@ -95,6 +95,11 @@ stdenv.mkDerivation (args // { # make[2]: *** [Makefile:199: backup] Error 1 enableParallelBuilding = lib.versionAtLeast version "4.08"; + # Workaround missing dependencies for install parallelism: + # install: target '...-ocaml-4.14.0/lib/ocaml/threads': No such file or directory + # make[1]: *** [Makefile:140: installopt] Error 1 + enableParallelInstalling = false; + # Workaround lack of parallelism support among top-level targets: # we place nixpkgs-specific targets to a separate file and set # sequential order among them as a single rule. diff --git a/pkgs/development/interpreters/s9fes/default.nix b/pkgs/development/interpreters/s9fes/default.nix index a05dde8f1f51..7cf60b00eb9b 100644 --- a/pkgs/development/interpreters/s9fes/default.nix +++ b/pkgs/development/interpreters/s9fes/default.nix @@ -24,6 +24,9 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses ]; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "PREFIX=$(out)" ]; enableParallelBuilding = true; + # ...-bash-5.2-p15/bin/bash: line 1: ...-s9fes-20181205/bin/s9help: No such file or directory + # make: *** [Makefile:157: install-util] Error 1 + enableParallelInstalling = false; meta = with lib; { description = "Scheme 9 From Empty Space, an interpreter for R4RS Scheme"; diff --git a/pkgs/development/libraries/qt-4.x/4.8/qmake-hook.sh b/pkgs/development/libraries/qt-4.x/4.8/qmake-hook.sh index f288e99dd12a..b024f52f2046 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/qmake-hook.sh +++ b/pkgs/development/libraries/qt-4.x/4.8/qmake-hook.sh @@ -8,6 +8,11 @@ qmakeConfigurePhase() { echo "qmake4Hook: enabled parallel building" fi + if ! [[ -v enableParallelInstalling ]]; then + enableParallelInstalling=1 + echo "qmake: enabled parallel installing" + fi + runHook postConfigure } diff --git a/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh b/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh index 741225a5aa81..0d30f0e26653 100644 --- a/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh +++ b/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh @@ -38,6 +38,11 @@ qmakeConfigurePhase() { echo "qmake: enabled parallel building" fi + if ! [[ -v enableParallelInstalling ]]; then + enableParallelInstalling=1 + echo "qmake: enabled parallel installing" + fi + runHook postConfigure } diff --git a/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh b/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh index ec1d2ea6124e..8c4ce096443f 100644 --- a/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh +++ b/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh @@ -40,6 +40,11 @@ qmakeConfigurePhase() { echo "qmake: enabled parallel building" fi + if ! [[ -v enableParallelInstalling ]]; then + enableParallelInstalling=1 + echo "qmake: enabled parallel installing" + fi + runHook postConfigure } diff --git a/pkgs/development/tools/analysis/eresi/default.nix b/pkgs/development/tools/analysis/eresi/default.nix index 9d1487ea99b6..3d5571ddea42 100644 --- a/pkgs/development/tools/analysis/eresi/default.nix +++ b/pkgs/development/tools/analysis/eresi/default.nix @@ -60,6 +60,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ which ]; buildInputs = [ openssl readline ]; enableParallelBuilding = true; + # ln: failed to create symbolic link '...-eresi-0.83-a3-phoenix//bin/elfsh': No such file or directory + # make: *** [Makefile:108: install64] Error 1 + enableParallelInstalling = false; installTargets = lib.singleton "install" ++ lib.optional stdenv.is64bit "install64"; diff --git a/pkgs/development/tools/build-managers/bmake/setup-hook.sh b/pkgs/development/tools/build-managers/bmake/setup-hook.sh index c5ca27dd9105..f477a96d57ab 100644 --- a/pkgs/development/tools/build-managers/bmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/bmake/setup-hook.sh @@ -76,6 +76,7 @@ bmakeInstallPhase() { # shellcheck disable=SC2086 local flagsArray=( + ${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL=$SHELL # Old bash empty array hack $makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"} diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index 1d25887754ad..b28ed42b6896 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -130,6 +130,11 @@ cmakeConfigurePhase() { echo "cmake: enabled parallel building" fi + if ! [[ -v enableParallelInstalling ]]; then + enableParallelInstalling=1 + echo "cmake: enabled parallel installing" + fi + runHook postConfigure } diff --git a/pkgs/development/tools/build-managers/meson/setup-hook.sh b/pkgs/development/tools/build-managers/meson/setup-hook.sh index ded9c3c63b84..6305a405af21 100644 --- a/pkgs/development/tools/build-managers/meson/setup-hook.sh +++ b/pkgs/development/tools/build-managers/meson/setup-hook.sh @@ -28,6 +28,11 @@ mesonConfigurePhase() { echo "meson: enabled parallel building" fi + if ! [[ -v enableParallelInstalling ]]; then + enableParallelInstalling=1 + echo "meson: enabled parallel installing" + fi + runHook postConfigure } diff --git a/pkgs/development/tools/build-managers/ninja/setup-hook.sh b/pkgs/development/tools/build-managers/ninja/setup-hook.sh index ecaa8b88c1aa..7fa5e4675f39 100644 --- a/pkgs/development/tools/build-managers/ninja/setup-hook.sh +++ b/pkgs/development/tools/build-managers/ninja/setup-hook.sh @@ -53,8 +53,16 @@ ninjaCheckPhase() { ninjaInstallPhase() { runHook preInstall + local buildCores=1 + + # Parallel building is enabled by default. + if [ "${enableParallelInstalling-1}" ]; then + buildCores="$NIX_BUILD_CORES" + fi + # shellcheck disable=SC2086 local flagsArray=( + -j$buildCores $ninjaFlags "${ninjaFlagsArray[@]}" ${installTargets:-install} ) diff --git a/pkgs/development/tools/build-managers/scons/setup-hook.sh b/pkgs/development/tools/build-managers/scons/setup-hook.sh index 0b908f68286b..67358ee843d1 100644 --- a/pkgs/development/tools/build-managers/scons/setup-hook.sh +++ b/pkgs/development/tools/build-managers/scons/setup-hook.sh @@ -33,6 +33,7 @@ sconsInstallPhase() { fi local flagsArray=( + ${enableParallelInstalling:+-j${NIX_BUILD_CORES}} $sconsFlags ${sconsFlagsArray[@]} $installFlags ${installFlagsArray[@]} ${installTargets:-install} diff --git a/pkgs/development/tools/build-managers/wafHook/setup-hook.sh b/pkgs/development/tools/build-managers/wafHook/setup-hook.sh index e2f6714a32d4..4d95c28de1f1 100644 --- a/pkgs/development/tools/build-managers/wafHook/setup-hook.sh +++ b/pkgs/development/tools/build-managers/wafHook/setup-hook.sh @@ -30,6 +30,11 @@ wafConfigurePhase() { echo "waf: enabled parallel building" fi + if ! [[ -v enableParallelInstalling ]]; then + enableParallelInstalling=1 + echo "waf: enabled parallel installing" + fi + runHook postConfigure } @@ -68,6 +73,7 @@ wafInstallPhase() { fi local flagsArray=( + ${enableParallelInstalling:+-j ${NIX_BUILD_CORES}} $wafFlags ${wafFlagsArray[@]} $installFlags ${installFlagsArray[@]} ${installTargets:-install} diff --git a/pkgs/os-specific/linux/sssd/default.nix b/pkgs/os-specific/linux/sssd/default.nix index 328098dbea33..b56748a94697 100644 --- a/pkgs/os-specific/linux/sssd/default.nix +++ b/pkgs/os-specific/linux/sssd/default.nix @@ -54,6 +54,9 @@ stdenv.mkDerivation rec { ''; enableParallelBuilding = true; + # Disable parallel install due to missing depends: + # libtool: error: error: relink '_py3sss.la' with the above command before installing i + enableParallelInstalling = false; nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config doxygen ]; buildInputs = [ augeas dnsutils c-ares curl cyrus_sasl ding-libs libnl libunistring nss samba nfs-utils p11-kit python3 popt diff --git a/pkgs/servers/irc/solanum/default.nix b/pkgs/servers/irc/solanum/default.nix index df1218ba7920..14924e6656c9 100644 --- a/pkgs/servers/irc/solanum/default.nix +++ b/pkgs/servers/irc/solanum/default.nix @@ -57,6 +57,11 @@ stdenv.mkDerivation rec { doCheck = !stdenv.isDarwin; enableParallelBuilding = true; + # Missing install depends: + # ...-binutils-2.40/bin/ld: cannot find ./.libs/libircd.so: No such file or directory + # collect2: error: ld returned 1 exit status + # make[4]: *** [Makefile:634: solanum] Error 1 + enableParallelInstalling = false; meta = with lib; { description = "An IRCd for unified networks"; diff --git a/pkgs/servers/monitoring/net-snmp/default.nix b/pkgs/servers/monitoring/net-snmp/default.nix index e4447d7a844c..6f7e696c5d6d 100644 --- a/pkgs/servers/monitoring/net-snmp/default.nix +++ b/pkgs/servers/monitoring/net-snmp/default.nix @@ -49,6 +49,9 @@ in stdenv.mkDerivation rec { ++ lib.optional withPerlTools perlWithPkgs; enableParallelBuilding = true; + # Missing dependencies during relinking: + # ./.libs/libnetsnmpagent.so: file not recognized: file format not recognized + enableParallelInstalling = false; doCheck = false; # tries to use networking postInstall = '' diff --git a/pkgs/servers/x11/xorg/builder.sh b/pkgs/servers/x11/xorg/builder.sh index 9ee81091584b..a9c607ae35ea 100644 --- a/pkgs/servers/x11/xorg/builder.sh +++ b/pkgs/servers/x11/xorg/builder.sh @@ -37,5 +37,6 @@ fi enableParallelBuilding=1 +enableParallelInstalling=1 genericBuild diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 46b22f337303..7d8c311edce2 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -441,6 +441,7 @@ else let } // lib.optionalAttrs (enableParallelBuilding) { inherit enableParallelBuilding; enableParallelChecking = attrs.enableParallelChecking or true; + enableParallelInstalling = attrs.enableParallelInstalling or true; } // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != [] || stdenv.hostPlatform.isMusl) { NIX_HARDENING_ENABLE = enabledHardeningOptions; } // lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform ? gcc.arch) { diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 1a637bf13fdd..734abb890c24 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -1376,6 +1376,7 @@ installPhase() { # shellcheck disable=SC2086 local flagsArray=( + ${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL=$SHELL ) _accumFlagsArray makeFlags makeFlagsArray installFlags installFlagsArray diff --git a/pkgs/tools/filesystems/xfsprogs/default.nix b/pkgs/tools/filesystems/xfsprogs/default.nix index 7c31657dd946..c8f4b7d93116 100644 --- a/pkgs/tools/filesystems/xfsprogs/default.nix +++ b/pkgs/tools/filesystems/xfsprogs/default.nix @@ -23,6 +23,9 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libuuid ]; # Dev headers include enableParallelBuilding = true; + # Install fails as: + # make[1]: *** No rule to make target '\', needed by 'kmem.lo'. Stop. + enableParallelInstalling = false; # @sbindir@ is replaced with /run/current-system/sw/bin to fix dependency cycles preConfigure = '' diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index ec2e5ce64c93..9950d3c56f99 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -67,6 +67,10 @@ stdenv.mkDerivation rec { ''; enableParallelBuilding = true; + # Missing install depends: + # ...-coreutils-9.1/bin/install: cannot stat 'asy-keywords.el': No such file or directory + # make: *** [Makefile:272: install-asy] Error 1 + enableParallelInstalling = false; meta = with lib; { description = "A tool for programming graphics intended to replace Metapost"; diff --git a/pkgs/tools/networking/vpnc/default.nix b/pkgs/tools/networking/vpnc/default.nix index 4fbb26eba21d..f9507cf459c7 100644 --- a/pkgs/tools/networking/vpnc/default.nix +++ b/pkgs/tools/networking/vpnc/default.nix @@ -32,6 +32,10 @@ stdenv.mkDerivation { ''; enableParallelBuilding = true; + # Missing install depends: + # install: target '...-vpnc-unstable-2021-11-04/share/doc/vpnc': No such file or directory + # make: *** [Makefile:149: install-doc] Error 1 + enableParallelInstalling = false; meta = with lib; { homepage = "https://davidepucci.it/doc/vpnc/";