From c2154d4c8422ddc1c201d503bb52edff854af2ad Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 31 Aug 2017 14:28:25 +0200 Subject: Rename a few configuration options In particular, drop the "build-" and "gc-" prefixes which are pointless. So now you can say nix build --no-sandbox instead of nix build --no-build-use-sandbox --- src/libstore/globals.hh | 84 ++++++++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 36 deletions(-) (limited to 'src/libstore/globals.hh') diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index 9ebbf7b477bb..c20d147f5d34 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -89,8 +89,9 @@ public: Setting keepGoing{this, false, "keep-going", "Whether to keep building derivations when another build fails."}; - Setting tryFallback{this, false, "build-fallback", - "Whether to fall back to building when substitution fails."}; + Setting tryFallback{this, false, "fallback", + "Whether to fall back to building when substitution fails.", + {"build-fallback"}}; /* Whether to show build log output in real time. */ bool verboseBuild = true; @@ -99,14 +100,15 @@ public: the log to show if a build fails. */ size_t logLines = 10; - MaxBuildJobsSetting maxBuildJobs{this, 1, "build-max-jobs", - "Maximum number of parallel build jobs. \"auto\" means use number of cores."}; + MaxBuildJobsSetting maxBuildJobs{this, 1, "max-jobs", + "Maximum number of parallel build jobs. \"auto\" means use number of cores.", + {"build-max-jobs"}}; - Setting buildCores{this, getDefaultCores(), "build-cores", + Setting buildCores{this, getDefaultCores(), "cores", "Number of CPU cores to utilize in parallel within a build, " "i.e. by passing this number to Make via '-j'. 0 means that the " "number of actual CPU cores on the local host ought to be " - "auto-detected."}; + "auto-detected.", {"build-cores"}}; /* Read-only mode. Don't copy stuff to the store, don't change the database. */ @@ -115,14 +117,15 @@ public: Setting thisSystem{this, SYSTEM, "system", "The canonical Nix system name."}; - Setting maxSilentTime{this, 0, "build-max-silent-time", + Setting maxSilentTime{this, 0, "max-silent-time", "The maximum time in seconds that a builer can go without " "producing any output on stdout/stderr before it is killed. " - "0 means infinity."}; + "0 means infinity.", + {"build-max-silent-time"}}; - Setting buildTimeout{this, 0, "build-timeout", + Setting buildTimeout{this, 0, "timeout", "The maximum duration in seconds that a builder can run. " - "0 means infinity."}; + "0 means infinity.", {"build-timeout"}}; Setting useBuildHook{this, true, "remote-builds", "Whether to use build hooks (for distributed builds)."}; @@ -149,27 +152,32 @@ public: Setting syncBeforeRegistering{this, false, "sync-before-registering", "Whether to call sync() before registering a path as valid."}; - Setting useSubstitutes{this, true, "build-use-substitutes", - "Whether to use substitutes."}; + Setting useSubstitutes{this, true, "use-substitutes", + "Whether to use substitutes.", + {"build-use-substitutes"}}; Setting buildUsersGroup{this, "", "build-users-group", "The Unix group that contains the build users."}; - Setting impersonateLinux26{this, false, "build-impersonate-linux-26", - "Whether to impersonate a Linux 2.6 machine on newer kernels."}; + Setting impersonateLinux26{this, false, "impersonate-linux-26", + "Whether to impersonate a Linux 2.6 machine on newer kernels.", + {"build-impersonate-linux-26"}}; - Setting keepLog{this, true, "build-keep-log", - "Whether to store build logs."}; + Setting keepLog{this, true, "keep-build-log", + "Whether to store build logs.", + {"build-keep-log"}}; - Setting compressLog{this, true, "build-compress-log", - "Whether to compress logs."}; + Setting compressLog{this, true, "compress-build-log", + "Whether to compress logs.", + {"build-compress-log"}}; - Setting maxLogSize{this, 0, "build-max-log-size", + Setting maxLogSize{this, 0, "max-build-log-size", "Maximum number of bytes a builder can write to stdout/stderr " - "before being killed (0 means no limit)."}; + "before being killed (0 means no limit).", + {"build-max-log-size"}}; - /* When build-repeat > 0 and verboseBuild == true, whether to - print repeated builds (i.e. builds other than the first one) to + /* When buildRepeat > 0 and verboseBuild == true, whether to print + repeated builds (i.e. builds other than the first one) to stderr. Hack to prevent Hydra logs from being polluted. */ bool printRepeatedBuilds = true; @@ -180,18 +188,21 @@ public: "Whether to check if new GC roots can in fact be found by the " "garbage collector."}; - Setting gcKeepOutputs{this, false, "gc-keep-outputs", - "Whether the garbage collector should keep outputs of live derivations."}; + Setting gcKeepOutputs{this, false, "keep-outputs", + "Whether the garbage collector should keep outputs of live derivations.", + {"gc-keep-outputs"}}; - Setting gcKeepDerivations{this, true, "gc-keep-derivations", - "Whether the garbage collector should keep derivers of live paths."}; + Setting gcKeepDerivations{this, true, "keep-derivations", + "Whether the garbage collector should keep derivers of live paths.", + {"gc-keep-derivations"}}; Setting autoOptimiseStore{this, false, "auto-optimise-store", "Whether to automatically replace files with identical contents with hard links."}; - Setting envKeepDerivations{this, false, "env-keep-derivations", + Setting envKeepDerivations{this, false, "keep-env-derivations", "Whether to add derivations as a dependency of user environments " - "(to prevent them from being GCed)."}; + "(to prevent them from being GCed).", + {"env-keep-derivations"}}; /* Whether to lock the Nix client and worker to the same CPU. */ bool lockCPU; @@ -202,24 +213,25 @@ public: Setting enableNativeCode{this, false, "allow-unsafe-native-code-during-evaluation", "Whether builtin functions that allow executing native code should be enabled."}; - Setting sandboxMode{this, smDisabled, "build-use-sandbox", + Setting sandboxMode{this, smDisabled, "sandbox", "Whether to enable sandboxed builds. Can be \"true\", \"false\" or \"relaxed\".", - {"build-use-chroot"}}; + {"build-use-chroot", "build-use-sandbox"}}; - Setting sandboxPaths{this, {}, "build-sandbox-paths", + Setting sandboxPaths{this, {}, "sandbox-paths", "The paths to make available inside the build sandbox.", - {"build-chroot-dirs"}}; + {"build-chroot-dirs", "build-sandbox-paths"}}; - Setting extraSandboxPaths{this, {}, "build-extra-sandbox-paths", + Setting extraSandboxPaths{this, {}, "extra-sandbox-paths", "Additional paths to make available inside the build sandbox.", - {"build-extra-chroot-dirs"}}; + {"build-extra-chroot-dirs", "build-extra-sandbox-paths"}}; Setting restrictEval{this, false, "restrict-eval", "Whether to restrict file system access to paths in $NIX_PATH, " "and to disallow fetching files from the network."}; - Setting buildRepeat{this, 0, "build-repeat", - "The number of times to repeat a build in order to verify determinism."}; + Setting buildRepeat{this, 0, "repeat", + "The number of times to repeat a build in order to verify determinism.", + {"build-repeat"}}; #if __linux__ Setting sandboxShmSize{this, "50%", "sandbox-dev-shm-size", -- cgit 1.4.1