Merge pull request #4750 from abbradar/nix-maxcores

Add buildCores option to nix
This commit is contained in:
lethalman 2014-11-01 22:01:39 +01:00
commit f079cd1721

View File

@ -36,6 +36,7 @@ let
# /etc/nixos/configuration.nix. Do not edit it!
build-users-group = nixbld
build-max-jobs = ${toString (cfg.maxJobs)}
build-cores = ${toString (cfg.buildCores)}
build-use-chroot = ${if cfg.useChroot then "true" else "false"}
build-chroot-dirs = ${toString cfg.chrootDirs} /bin/sh=${sh} $(echo $extraPaths)
binary-caches = ${toString cfg.binaryCaches}
@ -74,6 +75,19 @@ in
";
};
buildCores = mkOption {
type = types.int;
default = 1;
example = 64;
description = ''
This option defines the maximum number of concurrent tasks during
one build. It affects, e.g., -j option for make. The default is 1.
Some builds may become non-deterministic with this option; use with
care! Packages will only be affected if enableParallelBuilding is
set for them.
'';
};
useChroot = mkOption {
type = types.bool;
default = false;