Skip to content

Commit

Permalink
Merge pull request #172962 from Artturin/defaultparallelnorebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
siraben authored May 25, 2022
2 parents ab6c34c + 1d44ac1 commit b20b6fa
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkgs/build-support/bintools-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ stdenv.mkDerivation {
dontBuild = true;
dontConfigure = true;

enableParallelBuilding = true;

unpackPhase = ''
src=$PWD
'';
Expand Down
1 change: 1 addition & 0 deletions pkgs/build-support/cc-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ stdenv.mkDerivation {

dontBuild = true;
dontConfigure = true;
enableParallelBuilding = true;

unpackPhase = ''
src=$PWD
Expand Down
1 change: 1 addition & 0 deletions pkgs/build-support/expand-response-params/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down
1 change: 1 addition & 0 deletions pkgs/build-support/nuke-references/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ stdenvNoCC.mkDerivation {
name = "nuke-references";

strictDeps = true;
enableParallelBuilding = true;
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/build-support/pkg-config-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
Expand Down
1 change: 1 addition & 0 deletions pkgs/build-support/trivial-builders.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ rec {
# TODO(@Artturin): enable strictDeps always
}: buildCommand:
stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit buildCommand name;
passAsFile = [ "buildCommand" ]
++ (derivationArgs.passAsFile or []);
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/expat/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/libelf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ stdenv.mkDerivation rec {
./preprocessor-warnings.patch
];

enableParallelBuilding = true;

doCheck = true;

configureFlags = []
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/libffi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/libiconv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
sha256 = "016c57srqr0bza5fxjxfrx6aqxkqy0s3gkhcg7p7fhk5i6sv38g6";
};

enableParallelBuilding = true;

setupHooks = [
../../../build-support/setup-hooks/role.bash
./setup-hook.sh
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/libidn2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/libmpc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
};

strictDeps = true;
enableParallelBuilding = true;

buildInputs = [ gmp mpfr ];

doCheck = true; # not cross;
Expand Down
6 changes: 5 additions & 1 deletion pkgs/development/perl-modules/generic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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 { });
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/tools/misc/autoconf-archive/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
};

strictDeps = true;
enableParallelBuilding = true;

buildInputs = [ xz ];

meta = with lib; {
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/tools/misc/gnum4/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
};

strictDeps = true;
enableParallelBuilding = true;

doCheck = false;

configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ]
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/tools/misc/help2man/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ stdenv.mkDerivation rec {

strictDeps = true;

enableParallelBuilding = true;

nativeBuildInputs = [ gettext perlPackages.perl perlPackages.LocaleGettext ];
buildInputs = [ perlPackages.LocaleGettext libintl ];

Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/tools/misc/patchelf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/tools/misc/texinfo/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
2 changes: 2 additions & 0 deletions pkgs/os-specific/linux/kernel-headers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
2 changes: 2 additions & 0 deletions pkgs/stdenv/linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions pkgs/tools/compression/xz/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ stdenv.mkDerivation rec {

configureFlags = lib.optional enableStatic "--disable-shared";

enableParallelBuilding = true;
doCheck = true;

preCheck = ''
Expand Down
2 changes: 2 additions & 0 deletions pkgs/tools/misc/file/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions pkgs/tools/system/which/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ stdenv.mkDerivation rec {
};

strictDeps = true;
enableParallelBuilding = true;

meta = with lib; {
homepage = "https://www.gnu.org/software/which/";
Expand Down

0 comments on commit b20b6fa

Please sign in to comment.