1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

* New configuration setting `build-max-jobs' which sets the default

for the `-j' flag (i.e., the maximum number of jobs to execute in
  parallel).  Useful on multi-processor machines.
This commit is contained in:
Eelco Dolstra 2006-08-10 20:19:13 +00:00
parent 3e239a37ff
commit d19b6521fc
2 changed files with 17 additions and 0 deletions

View file

@ -94,7 +94,14 @@ static void initAndRun(int argc, char * * argv)
nixConfDir = canonPath(getEnv("NIX_CONF_DIR", NIX_CONF_DIR));
nixLibexecDir = canonPath(getEnv("NIX_LIBEXEC_DIR", NIX_LIBEXEC_DIR));
/* Get some settings from the configuration file. */
thisSystem = querySetting("system", SYSTEM);
{
int n;
if (!string2Int(querySetting("build-max-jobs", "1"), n) || n < 0)
throw Error("invalid value for configuration setting `build-max-jobs'");
maxBuildJobs = n;
}
/* Catch SIGINT. */
struct sigaction act, oact;