mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
Merge pull request #4750 from abbradar/nix-maxcores
Add buildCores option to nix
This commit is contained in:
commit
f079cd1721
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user