diff options
author | Artturin <Artturin@artturin.com> | 2022-05-14 04:13:49 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2022-05-25 16:03:14 +0300 |
commit | 1d44ac176ce6de74ac912a5b043e948a87a6d2f5 (patch) | |
tree | e24df105f8085abbe7e449d1f5e6058d864514c0 | |
parent | 39a2f44695940e04dfdb107a1cdfcbc51daa9e50 (diff) |
treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same
when enableParallelBuildingByDefault is enabled verified with `nix-diff $(nix eval ".#gcc-unwrapped.drvPath") $(nix eval --expr 'with import ./. { config = { enableParallelBuildingByDefault = true; }; }; gcc-unwrapped.drvPath' --impure)`
23 files changed, 43 insertions, 1 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 4c2a13da015ef..b5adae03df2db 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -128,6 +128,8 @@ stdenv.mkDerivation { dontBuild = true; dontConfigure = true; + enableParallelBuilding = true; + unpackPhase = '' src=$PWD ''; diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index ac6257220fd11..35d714f9b41e1 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -162,6 +162,7 @@ stdenv.mkDerivation { dontBuild = true; dontConfigure = true; + enableParallelBuilding = true; unpackPhase = '' src=$PWD diff --git a/pkgs/build-support/expand-response-params/default.nix b/pkgs/build-support/expand-response-params/default.nix index bc161d790225c..9371b77023626 100644 --- a/pkgs/build-support/expand-response-params/default.nix +++ b/pkgs/build-support/expand-response-params/default.nix @@ -4,6 +4,7 @@ stdenv.mkDerivation { name = "expand-response-params"; src = ./expand-response-params.c; strictDeps = true; + enableParallelBuilding = true; # Work around "stdenv-darwin-boot-2 is not allowed to refer to path # /nix/store/...-expand-response-params.c" unpackPhase = '' diff --git a/pkgs/build-support/nuke-references/default.nix b/pkgs/build-support/nuke-references/default.nix index 639992c0b85aa..8dd9704aa4b4a 100644 --- a/pkgs/build-support/nuke-references/default.nix +++ b/pkgs/build-support/nuke-references/default.nix @@ -15,6 +15,7 @@ stdenvNoCC.mkDerivation { name = "nuke-references"; strictDeps = true; + enableParallelBuilding = true; dontUnpack = true; dontConfigure = true; dontBuild = true; diff --git a/pkgs/build-support/pkg-config-wrapper/default.nix b/pkgs/build-support/pkg-config-wrapper/default.nix index 2184b87eb1aec..312d2fe02610a 100644 --- a/pkgs/build-support/pkg-config-wrapper/default.nix +++ b/pkgs/build-support/pkg-config-wrapper/default.nix @@ -32,6 +32,8 @@ stdenv.mkDerivation { pname = targetPrefix + pkg-config.pname + "-wrapper"; inherit (pkg-config) version; + enableParallelBuilding = true; + preferLocalBuild = true; shell = getBin stdenvNoCC.shell + stdenvNoCC.shell.shellPath or ""; diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 8e853888719c7..1e04c9b0e293d 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -71,6 +71,7 @@ rec { # TODO(@Artturin): enable strictDeps always }: buildCommand: stdenv.mkDerivation ({ + enableParallelBuilding = true; inherit buildCommand name; passAsFile = [ "buildCommand" ] ++ (derivationArgs.passAsFile or []); diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix index 67f151c4f575c..f20abe0bfc35f 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -28,6 +28,8 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; # TODO: fix referrers outputBin = "dev"; + enableParallelBuilding = true; + configureFlags = lib.optional stdenv.isFreeBSD "--with-pic"; outputMan = "dev"; # tiny page for a dev tool diff --git a/pkgs/development/libraries/libelf/default.nix b/pkgs/development/libraries/libelf/default.nix index 695670853b719..6d894da17d0e6 100644 --- a/pkgs/development/libraries/libelf/default.nix +++ b/pkgs/development/libraries/libelf/default.nix @@ -23,6 +23,8 @@ stdenv.mkDerivation rec { ./preprocessor-warnings.patch ]; + enableParallelBuilding = true; + doCheck = true; configureFlags = [] diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index 0e71e2409cf40..7387a4a1f0628 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -26,6 +26,8 @@ stdenv.mkDerivation rec { strictDeps = true; outputs = [ "out" "dev" "man" "info" ]; + enableParallelBuilding = true; + configureFlags = [ "--with-gcc-arch=generic" # no detection of -march= or -mtune= "--enable-pax_emutramp" diff --git a/pkgs/development/libraries/libiconv/default.nix b/pkgs/development/libraries/libiconv/default.nix index 5be5ecfd82e43..a6481970ef27e 100644 --- a/pkgs/development/libraries/libiconv/default.nix +++ b/pkgs/development/libraries/libiconv/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { sha256 = "016c57srqr0bza5fxjxfrx6aqxkqy0s3gkhcg7p7fhk5i6sv38g6"; }; + enableParallelBuilding = true; + setupHooks = [ ../../../build-support/setup-hooks/role.bash ./setup-hook.sh diff --git a/pkgs/development/libraries/libidn2/default.nix b/pkgs/development/libraries/libidn2/default.nix index d49f88a85f7c0..02809486863fb 100644 --- a/pkgs/development/libraries/libidn2/default.nix +++ b/pkgs/development/libraries/libidn2/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { patches = optional stdenv.isDarwin ./fix-error-darwin.patch; + enableParallelBuilding = true; + # The above patch causes the documentation to be regenerated, so the # documentation tools are required. nativeBuildInputs = optionals stdenv.isDarwin [ help2man texinfo ]; diff --git a/pkgs/development/libraries/libmpc/default.nix b/pkgs/development/libraries/libmpc/default.nix index 176bdbd85e9c0..8421a25030704 100644 --- a/pkgs/development/libraries/libmpc/default.nix +++ b/pkgs/development/libraries/libmpc/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { }; strictDeps = true; + enableParallelBuilding = true; + buildInputs = [ gmp mpfr ]; doCheck = true; # not cross; diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 6de9685715d70..9ff63c14e5188 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -5,6 +5,10 @@ , outputs ? [ "out" "devdoc" ] , src ? null +# enabling or disabling does nothing for perl packages so set it explicitly +# to false to not change hashes when enableParallelBuildingByDefault is enabled +, enableParallelBuilding ? false + , doCheck ? true , checkTarget ? "test" @@ -51,7 +55,7 @@ lib.warnIf (attrs ? name) "builtPerlPackage: `name' (\"${attrs.name}\") is depre fullperl = buildPerl; - inherit outputs src doCheck checkTarget; + inherit outputs src doCheck checkTarget enableParallelBuilding; inherit PERL_AUTOINSTALL AUTOMATED_TESTING PERL_USE_UNSAFE_INC; meta = defaultMeta // (attrs.meta or { }); diff --git a/pkgs/development/tools/misc/autoconf-archive/default.nix b/pkgs/development/tools/misc/autoconf-archive/default.nix index aff3d1ae08130..bde9db89434c1 100644 --- a/pkgs/development/tools/misc/autoconf-archive/default.nix +++ b/pkgs/development/tools/misc/autoconf-archive/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { }; strictDeps = true; + enableParallelBuilding = true; + buildInputs = [ xz ]; meta = with lib; { diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index 00e71835ebb85..34df06ad0f4cd 100644 --- a/pkgs/development/tools/misc/gnum4/default.nix +++ b/pkgs/development/tools/misc/gnum4/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { }; strictDeps = true; + enableParallelBuilding = true; + doCheck = false; configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ] diff --git a/pkgs/development/tools/misc/help2man/default.nix b/pkgs/development/tools/misc/help2man/default.nix index 05c6586971768..c432aaa82e12d 100644 --- a/pkgs/development/tools/misc/help2man/default.nix +++ b/pkgs/development/tools/misc/help2man/default.nix @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { strictDeps = true; + enableParallelBuilding = true; + nativeBuildInputs = [ gettext perlPackages.perl perlPackages.LocaleGettext ]; buildInputs = [ perlPackages.LocaleGettext libintl ]; diff --git a/pkgs/development/tools/misc/patchelf/default.nix b/pkgs/development/tools/misc/patchelf/default.nix index a3cac523bcb33..d51af9ca33273 100644 --- a/pkgs/development/tools/misc/patchelf/default.nix +++ b/pkgs/development/tools/misc/patchelf/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { strictDeps = true; setupHook = [ ./setup-hook.sh ]; + enableParallelBuilding = true; + # fails 8 out of 24 tests, problems when loading libc.so.6 doCheck = stdenv.name == "stdenv-linux"; diff --git a/pkgs/development/tools/misc/texinfo/common.nix b/pkgs/development/tools/misc/texinfo/common.nix index 3940843b8b0d9..e5814e9bda4c2 100644 --- a/pkgs/development/tools/misc/texinfo/common.nix +++ b/pkgs/development/tools/misc/texinfo/common.nix @@ -34,6 +34,8 @@ stdenv.mkDerivation { NATIVE_TOOLS_LDFLAGS = if crossBuildTools then "-L${getLib buildPackages.ncurses}/lib" else null; strictDeps = true; + enableParallelBuilding = true; + # We need a native compiler to build perl XS extensions # when cross-compiling. depsBuildBuild = [ buildPackages.stdenv.cc perl ]; diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix index 580bb49d8cfcd..f84416d98d6a3 100644 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -15,6 +15,8 @@ let ARCH = stdenvNoCC.hostPlatform.linuxArch; strictDeps = true; + enableParallelBuilding = true; + # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc. # We do this so we have a build->build, not build->host, C compiler. depsBuildBuild = [ buildPackages.stdenv.cc ]; diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 33fdce6b20698..956aeff494623 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -164,6 +164,7 @@ in pname = "bootstrap-stage0-${localSystem.libc}"; strictDeps = true; version = "bootstrap"; + enableParallelBuilding = true; buildCommand = '' mkdir -p $out ln -s ${bootstrapTools}/lib $out/lib @@ -268,6 +269,7 @@ in # apparently the interpreter needs to match libc, too. bintools = self.stdenvNoCC.mkDerivation { inherit (prevStage.bintools.bintools) name; + enableParallelBuilding = true; dontUnpack = true; dontBuild = true; strictDeps = true; diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index ddc3dc574fcad..75a58d011cef8 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation rec { configureFlags = lib.optional enableStatic "--disable-shared"; + enableParallelBuilding = true; doCheck = true; preCheck = '' diff --git a/pkgs/tools/misc/file/default.nix b/pkgs/tools/misc/file/default.nix index 26c8bf810f9ca..6454bb4eac284 100644 --- a/pkgs/tools/misc/file/default.nix +++ b/pkgs/tools/misc/file/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { }; strictDeps = true; + enableParallelBuilding = true; + nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) file; buildInputs = [ zlib ] ++ lib.optional stdenv.hostPlatform.isWindows libgnurx; diff --git a/pkgs/tools/system/which/default.nix b/pkgs/tools/system/which/default.nix index 3eed6538f33c5..aecf68e8c7fa1 100644 --- a/pkgs/tools/system/which/default.nix +++ b/pkgs/tools/system/which/default.nix @@ -10,6 +10,7 @@ stdenv.mkDerivation rec { }; strictDeps = true; + enableParallelBuilding = true; meta = with lib; { homepage = "https://www.gnu.org/software/which/"; |