forked from lix-project/lix
Convert option descriptions to Markdown
This commit is contained in:
parent
4e9cec79bf
commit
3da9a9241c
|
@ -14,14 +14,14 @@ MixEvalArgs::MixEvalArgs()
|
|||
{
|
||||
addFlag({
|
||||
.longName = "arg",
|
||||
.description = "argument to be passed to Nix functions",
|
||||
.description = "Pass the value *expr* as the argument *name* to Nix functions.",
|
||||
.labels = {"name", "expr"},
|
||||
.handler = {[&](std::string name, std::string expr) { autoArgs[name] = 'E' + expr; }}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "argstr",
|
||||
.description = "string-valued argument to be passed to Nix functions",
|
||||
.description = "Pass the string *string* as the argument *name* to Nix functions.",
|
||||
.labels = {"name", "string"},
|
||||
.handler = {[&](std::string name, std::string s) { autoArgs[name] = 'S' + s; }},
|
||||
});
|
||||
|
@ -29,14 +29,14 @@ MixEvalArgs::MixEvalArgs()
|
|||
addFlag({
|
||||
.longName = "include",
|
||||
.shortName = 'I',
|
||||
.description = "add a path to the list of locations used to look up `<...>` file names",
|
||||
.description = "Add *path* to the list of locations used to look up `<...>` file names.",
|
||||
.labels = {"path"},
|
||||
.handler = {[&](std::string s) { searchPath.push_back(s); }}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "impure",
|
||||
.description = "allow access to mutable paths and repositories",
|
||||
.description = "Allow access to mutable paths and repositories.",
|
||||
.handler = {[&]() {
|
||||
evalSettings.pureEval = false;
|
||||
}},
|
||||
|
@ -44,7 +44,7 @@ MixEvalArgs::MixEvalArgs()
|
|||
|
||||
addFlag({
|
||||
.longName = "override-flake",
|
||||
.description = "override a flake registry value",
|
||||
.description = "Override the flake registries, redirecting *original-ref* to *resolved-ref*.",
|
||||
.labels = {"original-ref", "resolved-ref"},
|
||||
.handler = {[&](std::string _from, std::string _to) {
|
||||
auto from = parseFlakeRef(_from, absPath("."));
|
||||
|
|
|
@ -10,25 +10,25 @@ MixCommonArgs::MixCommonArgs(const string & programName)
|
|||
addFlag({
|
||||
.longName = "verbose",
|
||||
.shortName = 'v',
|
||||
.description = "increase verbosity level",
|
||||
.description = "Increase the logging verbosity level.",
|
||||
.handler = {[]() { verbosity = (Verbosity) (verbosity + 1); }},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "quiet",
|
||||
.description = "decrease verbosity level",
|
||||
.description = "Decrease the logging verbosity level.",
|
||||
.handler = {[]() { verbosity = verbosity > lvlError ? (Verbosity) (verbosity - 1) : lvlError; }},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "debug",
|
||||
.description = "enable debug output",
|
||||
.description = "Set the logging verbosity level to 'debug'.",
|
||||
.handler = {[]() { verbosity = lvlDebug; }},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "option",
|
||||
.description = "set a Nix configuration option (overriding `nix.conf`)",
|
||||
.description = "Set the Nix configuration setting *name* to *value* (overriding `nix.conf`).",
|
||||
.labels = {"name", "value"},
|
||||
.handler = {[](std::string name, std::string value) {
|
||||
try {
|
||||
|
@ -51,8 +51,7 @@ MixCommonArgs::MixCommonArgs(const string & programName)
|
|||
|
||||
addFlag({
|
||||
.longName = "log-format",
|
||||
.description = "format of log output; `raw`, `internal-json`, `bar` "
|
||||
"or `bar-with-logs`",
|
||||
.description = "Set the format of log output; one of `raw`, `internal-json`, `bar` or `bar-with-logs`.",
|
||||
.labels = {"format"},
|
||||
.handler = {[](std::string format) { setLogFormat(format); }},
|
||||
});
|
||||
|
@ -60,7 +59,7 @@ MixCommonArgs::MixCommonArgs(const string & programName)
|
|||
addFlag({
|
||||
.longName = "max-jobs",
|
||||
.shortName = 'j',
|
||||
.description = "maximum number of parallel builds",
|
||||
.description = "The maximum number of parallel builds.",
|
||||
.labels = Strings{"jobs"},
|
||||
.handler = {[=](std::string s) {
|
||||
settings.set("max-jobs", s);
|
||||
|
|
|
@ -16,7 +16,7 @@ struct MixDryRun : virtual Args
|
|||
|
||||
MixDryRun()
|
||||
{
|
||||
mkFlag(0, "dry-run", "show what this command would do without doing it", &dryRun);
|
||||
mkFlag(0, "dry-run", "Show what this command would do without doing it.", &dryRun);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -26,7 +26,7 @@ struct MixJSON : virtual Args
|
|||
|
||||
MixJSON()
|
||||
{
|
||||
mkFlag(0, "json", "produce JSON output", &json);
|
||||
mkFlag(0, "json", "Produce output in JSON format, suitable for consumption by another program.", &json);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -186,27 +186,27 @@ LegacyArgs::LegacyArgs(const std::string & programName,
|
|||
addFlag({
|
||||
.longName = "no-build-output",
|
||||
.shortName = 'Q',
|
||||
.description = "do not show build output",
|
||||
.description = "Do not show build output.",
|
||||
.handler = {[&]() {setLogFormat(LogFormat::raw); }},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "keep-failed",
|
||||
.shortName ='K',
|
||||
.description = "keep temporary directories of failed builds",
|
||||
.description = "Keep temporary directories of failed builds.",
|
||||
.handler = {&(bool&) settings.keepFailed, true},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "keep-going",
|
||||
.shortName ='k',
|
||||
.description = "keep going after a build fails",
|
||||
.description = "Keep going after a build fails.",
|
||||
.handler = {&(bool&) settings.keepGoing, true},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "fallback",
|
||||
.description = "build from source if substitution fails",
|
||||
.description = "Build from source if substitution fails.",
|
||||
.handler = {&(bool&) settings.tryFallback, true},
|
||||
});
|
||||
|
||||
|
@ -225,19 +225,19 @@ LegacyArgs::LegacyArgs(const std::string & programName,
|
|||
});
|
||||
};
|
||||
|
||||
intSettingAlias(0, "cores", "maximum number of CPU cores to use inside a build", "cores");
|
||||
intSettingAlias(0, "max-silent-time", "number of seconds of silence before a build is killed", "max-silent-time");
|
||||
intSettingAlias(0, "timeout", "number of seconds before a build is killed", "timeout");
|
||||
intSettingAlias(0, "cores", "Maximum number of CPU cores to use inside a build.", "cores");
|
||||
intSettingAlias(0, "max-silent-time", "Number of seconds of silence before a build is killed.", "max-silent-time");
|
||||
intSettingAlias(0, "timeout", "Number of seconds before a build is killed.", "timeout");
|
||||
|
||||
mkFlag(0, "readonly-mode", "do not write to the Nix store",
|
||||
mkFlag(0, "readonly-mode", "Do not write to the Nix store.",
|
||||
&settings.readOnlyMode);
|
||||
|
||||
mkFlag(0, "no-gc-warning", "disable warning about not using '--add-root'",
|
||||
mkFlag(0, "no-gc-warning", "Disable warnings about not using `--add-root`.",
|
||||
&gcWarning, false);
|
||||
|
||||
addFlag({
|
||||
.longName = "store",
|
||||
.description = "URI of the Nix store to use",
|
||||
.description = "The URL of the Nix store to use.",
|
||||
.labels = {"store-uri"},
|
||||
.handler = {&(std::string&) settings.storeUri},
|
||||
});
|
||||
|
|
|
@ -19,7 +19,7 @@ struct CmdAddToStore : MixDryRun, StoreCommand
|
|||
addFlag({
|
||||
.longName = "name",
|
||||
.shortName = 'n',
|
||||
.description = "name component of the store path",
|
||||
.description = "Override the name component of the store path. It defaults to the base name of *path*.",
|
||||
.labels = {"name"},
|
||||
.handler = {&namePart},
|
||||
});
|
||||
|
|
|
@ -19,7 +19,7 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile
|
|||
addFlag({
|
||||
.longName = "out-link",
|
||||
.shortName = 'o',
|
||||
.description = "path of the symlink to the build result",
|
||||
.description = "Use *path* as prefix for the symlinks to the build results. It defaults to `result`.",
|
||||
.labels = {"path"},
|
||||
.handler = {&outLink},
|
||||
.completer = completePath
|
||||
|
@ -27,13 +27,13 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile
|
|||
|
||||
addFlag({
|
||||
.longName = "no-link",
|
||||
.description = "do not create a symlink to the build result",
|
||||
.description = "Do not create symlinks to the build results.",
|
||||
.handler = {&outLink, Path("")},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "rebuild",
|
||||
.description = "rebuild an already built package and compare the result to the existing store paths",
|
||||
.description = "Rebuild an already built package and compare the result to the existing store paths.",
|
||||
.handler = {&buildMode, bmCheck},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ struct CmdBundle : InstallableCommand
|
|||
{
|
||||
addFlag({
|
||||
.longName = "bundler",
|
||||
.description = "use custom bundler",
|
||||
.description = fmt("Use a custom bundler instead of the default (`%s`).", bundler),
|
||||
.labels = {"flake-url"},
|
||||
.handler = {&bundler},
|
||||
.completer = {[&](size_t, std::string_view prefix) {
|
||||
|
@ -27,7 +27,7 @@ struct CmdBundle : InstallableCommand
|
|||
addFlag({
|
||||
.longName = "out-link",
|
||||
.shortName = 'o',
|
||||
.description = "path of the symlink to the build result",
|
||||
.description = "Override the name of the symlink to the build result. It defaults to the base name of the app.",
|
||||
.labels = {"path"},
|
||||
.handler = {&outLink},
|
||||
.completer = completePath
|
||||
|
@ -90,7 +90,7 @@ struct CmdBundle : InstallableCommand
|
|||
mkString(*evalState->allocAttr(*arg, evalState->symbols.create("system")), settings.thisSystem.get());
|
||||
|
||||
arg->attrs->sort();
|
||||
|
||||
|
||||
auto vRes = evalState->allocValue();
|
||||
evalState->callFunction(*bundler.toValue(*evalState).first, *arg, *vRes, noPos);
|
||||
|
||||
|
|
|
@ -65,18 +65,18 @@ StorePathsCommand::StorePathsCommand(bool recursive)
|
|||
if (recursive)
|
||||
addFlag({
|
||||
.longName = "no-recursive",
|
||||
.description = "apply operation to specified paths only",
|
||||
.description = "Apply operation to specified paths only.",
|
||||
.handler = {&this->recursive, false},
|
||||
});
|
||||
else
|
||||
addFlag({
|
||||
.longName = "recursive",
|
||||
.shortName = 'r',
|
||||
.description = "apply operation to closure of the specified paths",
|
||||
.description = "Apply operation to closure of the specified paths.",
|
||||
.handler = {&this->recursive, true},
|
||||
});
|
||||
|
||||
mkFlag(0, "all", "apply operation to the entire store", &all);
|
||||
mkFlag(0, "all", "Apply the operation to every store path.", &all);
|
||||
}
|
||||
|
||||
void StorePathsCommand::run(ref<Store> store)
|
||||
|
@ -133,7 +133,7 @@ MixProfile::MixProfile()
|
|||
{
|
||||
addFlag({
|
||||
.longName = "profile",
|
||||
.description = "profile to update",
|
||||
.description = "The profile to update.",
|
||||
.labels = {"path"},
|
||||
.handler = {&profile},
|
||||
.completer = completePath
|
||||
|
@ -190,14 +190,14 @@ MixEnvironment::MixEnvironment() : ignoreEnvironment(false)
|
|||
addFlag({
|
||||
.longName = "ignore-environment",
|
||||
.shortName = 'i',
|
||||
.description = "clear the entire environment (except those specified with --keep)",
|
||||
.description = "Clear the entire environment (except those specified with `--keep`).",
|
||||
.handler = {&ignoreEnvironment, true},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "keep",
|
||||
.shortName = 'k',
|
||||
.description = "keep specified environment variable",
|
||||
.description = "Keep the environment variable *name*.",
|
||||
.labels = {"name"},
|
||||
.handler = {[&](std::string s) { keep.insert(s); }},
|
||||
});
|
||||
|
@ -205,7 +205,7 @@ MixEnvironment::MixEnvironment() : ignoreEnvironment(false)
|
|||
addFlag({
|
||||
.longName = "unset",
|
||||
.shortName = 'u',
|
||||
.description = "unset specified environment variable",
|
||||
.description = "Unset the environment variable *name*.",
|
||||
.labels = {"name"},
|
||||
.handler = {[&](std::string s) { unset.insert(s); }},
|
||||
});
|
||||
|
|
|
@ -21,28 +21,28 @@ struct CmdCopy : StorePathsCommand
|
|||
{
|
||||
addFlag({
|
||||
.longName = "from",
|
||||
.description = "URI of the source Nix store",
|
||||
.description = "URL of the source Nix store.",
|
||||
.labels = {"store-uri"},
|
||||
.handler = {&srcUri},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "to",
|
||||
.description = "URI of the destination Nix store",
|
||||
.description = "URL of the destination Nix store.",
|
||||
.labels = {"store-uri"},
|
||||
.handler = {&dstUri},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "no-check-sigs",
|
||||
.description = "do not require that paths are signed by trusted keys",
|
||||
.description = "Do not require that paths are signed by trusted keys.",
|
||||
.handler = {&checkSigs, NoCheckSigs},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "substitute-on-destination",
|
||||
.shortName = 's',
|
||||
.description = "whether to try substitutes on the destination store (only supported by SSH)",
|
||||
.description = "Whether to try substitutes on the destination store (only supported by SSH stores).",
|
||||
.handler = {&substitute, Substitute},
|
||||
});
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ struct Common : InstallableCommand, MixProfile
|
|||
{
|
||||
addFlag({
|
||||
.longName = "redirect",
|
||||
.description = "redirect a store path to a mutable location",
|
||||
.description = "Redirect a store path to a mutable location.",
|
||||
.labels = {"installable", "outputs-dir"},
|
||||
.handler = {[&](std::string installable, std::string outputsDir) {
|
||||
redirects.push_back({installable, outputsDir});
|
||||
|
@ -334,7 +334,7 @@ struct CmdDevelop : Common, MixEnvironment
|
|||
addFlag({
|
||||
.longName = "command",
|
||||
.shortName = 'c',
|
||||
.description = "command and arguments to be executed instead of an interactive shell",
|
||||
.description = "Instead of starting an interactive shell, start the specified command and arguments.",
|
||||
.labels = {"command", "args"},
|
||||
.handler = {[&](std::vector<std::string> ss) {
|
||||
if (ss.empty()) throw UsageError("--command requires at least one argument");
|
||||
|
@ -344,38 +344,38 @@ struct CmdDevelop : Common, MixEnvironment
|
|||
|
||||
addFlag({
|
||||
.longName = "phase",
|
||||
.description = "phase to run (e.g. `build` or `configure`)",
|
||||
.description = "The stdenv phase to run (e.g. `build` or `configure`).",
|
||||
.labels = {"phase-name"},
|
||||
.handler = {&phase},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "configure",
|
||||
.description = "run the configure phase",
|
||||
.description = "Run the `configure` phase.",
|
||||
.handler = {&phase, {"configure"}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "build",
|
||||
.description = "run the build phase",
|
||||
.description = "Run the `build` phase.",
|
||||
.handler = {&phase, {"build"}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "check",
|
||||
.description = "run the check phase",
|
||||
.description = "Run the `check` phase.",
|
||||
.handler = {&phase, {"check"}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "install",
|
||||
.description = "run the install phase",
|
||||
.description = "Run the `install` phase.",
|
||||
.handler = {&phase, {"install"}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "installcheck",
|
||||
.description = "run the installcheck phase",
|
||||
.description = "Run the `installcheck` phase.",
|
||||
.handler = {&phase, {"installCheck"}},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -18,18 +18,18 @@ struct CmdEval : MixJSON, InstallableCommand
|
|||
|
||||
CmdEval()
|
||||
{
|
||||
mkFlag(0, "raw", "print strings unquoted", &raw);
|
||||
mkFlag(0, "raw", "Print strings without quotes or escaping.", &raw);
|
||||
|
||||
addFlag({
|
||||
.longName = "apply",
|
||||
.description = "apply a function to each argument",
|
||||
.description = "Apply the function *expr* to each argument.",
|
||||
.labels = {"expr"},
|
||||
.handler = {&apply},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "write-to",
|
||||
.description = "write a string or attrset of strings to 'path'",
|
||||
.description = "Write a string or attrset of strings to *path*.",
|
||||
.labels = {"path"},
|
||||
.handler = {&writeTo},
|
||||
});
|
||||
|
|
|
@ -222,7 +222,7 @@ struct CmdFlakeCheck : FlakeCommand
|
|||
{
|
||||
addFlag({
|
||||
.longName = "no-build",
|
||||
.description = "do not build checks",
|
||||
.description = "Do not build checks.",
|
||||
.handler = {&build, false}
|
||||
});
|
||||
}
|
||||
|
@ -573,7 +573,7 @@ struct CmdFlakeInitCommon : virtual Args, EvalCommand
|
|||
addFlag({
|
||||
.longName = "template",
|
||||
.shortName = 't',
|
||||
.description = "the template to use",
|
||||
.description = "The template to use.",
|
||||
.labels = {"template"},
|
||||
.handler = {&templateUrl},
|
||||
.completer = {[&](size_t, std::string_view prefix) {
|
||||
|
@ -717,7 +717,7 @@ struct CmdFlakeClone : FlakeCommand
|
|||
addFlag({
|
||||
.longName = "dest",
|
||||
.shortName = 'f',
|
||||
.description = "destination path",
|
||||
.description = "Clone the flake to path *dest*.",
|
||||
.labels = {"path"},
|
||||
.handler = {&destDir}
|
||||
});
|
||||
|
@ -807,7 +807,7 @@ struct CmdFlakeShow : FlakeCommand
|
|||
{
|
||||
addFlag({
|
||||
.longName = "legacy",
|
||||
.description = "show the contents of the 'legacyPackages' output",
|
||||
.description = "Show the contents of the `legacyPackages` output.",
|
||||
.handler = {&showLegacy, true}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -19,15 +19,15 @@ struct CmdHashBase : Command
|
|||
|
||||
CmdHashBase(FileIngestionMethod mode) : mode(mode)
|
||||
{
|
||||
mkFlag(0, "sri", "print hash in SRI format", &base, SRI);
|
||||
mkFlag(0, "base64", "print hash in base-64", &base, Base64);
|
||||
mkFlag(0, "base32", "print hash in base-32 (Nix-specific)", &base, Base32);
|
||||
mkFlag(0, "base16", "print hash in base-16", &base, Base16);
|
||||
mkFlag(0, "sri", "Print the hash in SRI format.", &base, SRI);
|
||||
mkFlag(0, "base64", "Print the hash in base-64 format.", &base, Base64);
|
||||
mkFlag(0, "base32", "Print the hash in base-32 (Nix-specific) format.", &base, Base32);
|
||||
mkFlag(0, "base16", "Print the hash in base-16 format.", &base, Base16);
|
||||
addFlag(Flag::mkHashTypeFlag("type", &ht));
|
||||
#if 0
|
||||
mkFlag()
|
||||
.longName("modulo")
|
||||
.description("compute hash modulo specified string")
|
||||
.description("Compute the hash modulo specified the string.")
|
||||
.labels({"modulus"})
|
||||
.dest(&modulus);
|
||||
#endif
|
||||
|
@ -40,15 +40,14 @@ struct CmdHashBase : Command
|
|||
|
||||
std::string description() override
|
||||
{
|
||||
const char* d;
|
||||
switch (mode) {
|
||||
case FileIngestionMethod::Flat:
|
||||
d = "print cryptographic hash of a regular file";
|
||||
break;
|
||||
return "print cryptographic hash of a regular file";
|
||||
case FileIngestionMethod::Recursive:
|
||||
d = "print cryptographic hash of the NAR serialisation of a path";
|
||||
return "print cryptographic hash of the NAR serialisation of a path";
|
||||
default:
|
||||
assert(false);
|
||||
};
|
||||
return d;
|
||||
}
|
||||
|
||||
void run() override
|
||||
|
|
|
@ -60,37 +60,37 @@ MixFlakeOptions::MixFlakeOptions()
|
|||
{
|
||||
addFlag({
|
||||
.longName = "recreate-lock-file",
|
||||
.description = "recreate lock file from scratch",
|
||||
.description = "Recreate the flake's lock file from scratch.",
|
||||
.handler = {&lockFlags.recreateLockFile, true}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "no-update-lock-file",
|
||||
.description = "do not allow any updates to the lock file",
|
||||
.description = "Do not allow any updates to the flake's lock file.",
|
||||
.handler = {&lockFlags.updateLockFile, false}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "no-write-lock-file",
|
||||
.description = "do not write the newly generated lock file",
|
||||
.description = "Do not write the flake's newly generated lock file.",
|
||||
.handler = {&lockFlags.writeLockFile, false}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "no-registries",
|
||||
.description = "don't use flake registries",
|
||||
.description = "Don't allow lookups in the flake registries.",
|
||||
.handler = {&lockFlags.useRegistries, false}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "commit-lock-file",
|
||||
.description = "commit changes to the lock file",
|
||||
.description = "Commit changes to the flake's lock file.",
|
||||
.handler = {&lockFlags.commitLockFile, true}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "update-input",
|
||||
.description = "update a specific flake input",
|
||||
.description = "Update a specific flake input (ignoring its previous entry in the lock file).",
|
||||
.labels = {"input-path"},
|
||||
.handler = {[&](std::string s) {
|
||||
lockFlags.inputUpdates.insert(flake::parseInputPath(s));
|
||||
|
@ -103,7 +103,7 @@ MixFlakeOptions::MixFlakeOptions()
|
|||
|
||||
addFlag({
|
||||
.longName = "override-input",
|
||||
.description = "override a specific flake input (e.g. `dwarffs/nixpkgs`)",
|
||||
.description = "Override a specific flake input (e.g. `dwarffs/nixpkgs`).",
|
||||
.labels = {"input-path", "flake-url"},
|
||||
.handler = {[&](std::string inputPath, std::string flakeRef) {
|
||||
lockFlags.inputOverrides.insert_or_assign(
|
||||
|
@ -114,7 +114,7 @@ MixFlakeOptions::MixFlakeOptions()
|
|||
|
||||
addFlag({
|
||||
.longName = "inputs-from",
|
||||
.description = "use the inputs of the specified flake as registry entries",
|
||||
.description = "Use the inputs of the specified flake as registry entries.",
|
||||
.labels = {"flake-url"},
|
||||
.handler = {[&](std::string flakeRef) {
|
||||
auto evalState = getEvalState();
|
||||
|
@ -143,22 +143,22 @@ SourceExprCommand::SourceExprCommand()
|
|||
addFlag({
|
||||
.longName = "file",
|
||||
.shortName = 'f',
|
||||
.description = "evaluate *file* rather than the default",
|
||||
.description = "Interpret installables as attribute paths relative to the Nix expression stored in *file*.",
|
||||
.labels = {"file"},
|
||||
.handler = {&file},
|
||||
.completer = completePath
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName ="expr",
|
||||
.description = "evaluate attributes from *expr*",
|
||||
.longName = "expr",
|
||||
.description = "Interpret installables as attribute paths relative to the Nix expression *expr*.",
|
||||
.labels = {"expr"},
|
||||
.handler = {&expr}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName ="derivation",
|
||||
.description = "operate on the store derivation rather than its outputs",
|
||||
.longName = "derivation",
|
||||
.description = "Operate on the store derivation rather than its outputs.",
|
||||
.handler = {&operateOn, OperateOn::Derivation},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ struct MixLs : virtual Args, MixJSON
|
|||
|
||||
MixLs()
|
||||
{
|
||||
mkFlag('R', "recursive", "list subdirectories recursively", &recursive);
|
||||
mkFlag('l', "long", "show more file information", &verbose);
|
||||
mkFlag('d', "directory", "show directories rather than their contents", &showDirectory);
|
||||
mkFlag('R', "recursive", "List subdirectories recursively.", &recursive);
|
||||
mkFlag('l', "long", "Show detailed file information.", &verbose);
|
||||
mkFlag('d', "directory", "Show directories rather than their contents.", &showDirectory);
|
||||
}
|
||||
|
||||
void listText(ref<FSAccessor> accessor)
|
||||
|
|
|
@ -69,15 +69,15 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs
|
|||
|
||||
addFlag({
|
||||
.longName = "help",
|
||||
.description = "show usage information",
|
||||
.description = "Show usage information.",
|
||||
.handler = {[&]() { if (!completions) showHelpAndExit(); }},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "help-config",
|
||||
.description = "show configuration options",
|
||||
.description = "Show configuration settings.",
|
||||
.handler = {[&]() {
|
||||
std::cout << "The following configuration options are available:\n\n";
|
||||
std::cout << "The following configuration settings are available:\n\n";
|
||||
Table2 tbl;
|
||||
std::map<std::string, Config::SettingInfo> settings;
|
||||
globalConfig.getSettings(settings);
|
||||
|
@ -91,25 +91,25 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs
|
|||
addFlag({
|
||||
.longName = "print-build-logs",
|
||||
.shortName = 'L',
|
||||
.description = "print full build logs on stderr",
|
||||
.description = "Print full build logs on standard error.",
|
||||
.handler = {[&]() {setLogFormat(LogFormat::barWithLogs); }},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "version",
|
||||
.description = "show version information",
|
||||
.description = "Show version information.",
|
||||
.handler = {[&]() { if (!completions) printVersion(programName); }},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "no-net",
|
||||
.description = "disable substituters and consider all previously downloaded files up-to-date",
|
||||
.description = "Disable substituters and consider all previously downloaded files up-to-date.",
|
||||
.handler = {[&]() { useNet = false; }},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "refresh",
|
||||
.description = "consider all previously downloaded files out-of-date",
|
||||
.description = "Consider all previously downloaded files out-of-date.",
|
||||
.handler = {[&]() { refresh = true; }},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -18,10 +18,10 @@ struct CmdPathInfo : StorePathsCommand, MixJSON
|
|||
|
||||
CmdPathInfo()
|
||||
{
|
||||
mkFlag('s', "size", "print size of the NAR dump of each path", &showSize);
|
||||
mkFlag('S', "closure-size", "print sum size of the NAR dumps of the closure of each path", &showClosureSize);
|
||||
mkFlag('h', "human-readable", "with -s and -S, print sizes like 1K 234M 5.67G etc.", &humanReadable);
|
||||
mkFlag(0, "sigs", "show signatures", &showSigs);
|
||||
mkFlag('s', "size", "Print the size of the NAR serialisation of each path.", &showSize);
|
||||
mkFlag('S', "closure-size", "Print the sum of the sizes of the NAR serialisations of the closure of each path.", &showClosureSize);
|
||||
mkFlag('h', "human-readable", "With `-s` and `-S`, print sizes in a human-friendly format such as `5.67G`.", &humanReadable);
|
||||
mkFlag(0, "sigs", "Show signatures.", &showSigs);
|
||||
}
|
||||
|
||||
std::string description() override
|
||||
|
|
|
@ -258,14 +258,14 @@ struct CmdStorePrefetchFile : StoreCommand, MixJSON
|
|||
{
|
||||
addFlag({
|
||||
.longName = "name",
|
||||
.description = "store path name",
|
||||
.description = "Override the name component of the resulting store path. It defaults to the base name of *url*.",
|
||||
.labels = {"name"},
|
||||
.handler = {&name}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "expected-hash",
|
||||
.description = "expected hash of the file",
|
||||
.description = "The expected hash of the file.",
|
||||
.labels = {"hash"},
|
||||
.handler = {[&](std::string s) {
|
||||
expectedHash = Hash::parseAny(s, hashType);
|
||||
|
@ -276,7 +276,9 @@ struct CmdStorePrefetchFile : StoreCommand, MixJSON
|
|||
|
||||
addFlag({
|
||||
.longName = "executable",
|
||||
.description = "make the resulting file executable",
|
||||
.description =
|
||||
"Make the resulting file executable. Note that this causes the "
|
||||
"resulting hash to be a NAR hash rather than a flat file hash.",
|
||||
.handler = {&executable, true},
|
||||
});
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ struct CmdShell : InstallablesCommand, RunCommon, MixEnvironment
|
|||
addFlag({
|
||||
.longName = "command",
|
||||
.shortName = 'c',
|
||||
.description = "command and arguments to be executed; defaults to '$SHELL'",
|
||||
.description = "Command and arguments to be executed, defaulting to `$SHELL`",
|
||||
.labels = {"command", "args"},
|
||||
.handler = {[&](std::vector<std::string> ss) {
|
||||
if (ss.empty()) throw UsageError("--command requires at least one argument");
|
||||
|
|
|
@ -19,7 +19,7 @@ struct CmdShowDerivation : InstallablesCommand
|
|||
addFlag({
|
||||
.longName = "recursive",
|
||||
.shortName = 'r',
|
||||
.description = "include the dependencies of the specified derivations",
|
||||
.description = "Include the dependencies of the specified derivations.",
|
||||
.handler = {&recursive, true}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ struct CmdCopySigs : StorePathsCommand
|
|||
addFlag({
|
||||
.longName = "substituter",
|
||||
.shortName = 's',
|
||||
.description = "use signatures from specified store",
|
||||
.description = "Use signatures from specified store.",
|
||||
.labels = {"store-uri"},
|
||||
.handler = {[&](std::string s) { substituterUris.push_back(s); }},
|
||||
});
|
||||
|
@ -101,7 +101,7 @@ struct CmdSignPaths : StorePathsCommand
|
|||
addFlag({
|
||||
.longName = "key-file",
|
||||
.shortName = 'k',
|
||||
.description = "file containing the secret signing key",
|
||||
.description = "File containing the secret signing key.",
|
||||
.labels = {"file"},
|
||||
.handler = {&secretKeyFile},
|
||||
.completer = completePath
|
||||
|
@ -150,7 +150,7 @@ struct CmdKeyGenerateSecret : Command
|
|||
{
|
||||
addFlag({
|
||||
.longName = "key-name",
|
||||
.description = "identifier of the key (e.g. `cache.example.org-1`)",
|
||||
.description = "Identifier of the key (e.g. `cache.example.org-1`).",
|
||||
.labels = {"name"},
|
||||
.handler = {&keyName},
|
||||
});
|
||||
|
|
|
@ -13,7 +13,7 @@ struct CmdStoreDelete : StorePathsCommand
|
|||
{
|
||||
addFlag({
|
||||
.longName = "ignore-liveness",
|
||||
.description = "do not check whether the paths are reachable from a root",
|
||||
.description = "Do not check whether the paths are reachable from a root.",
|
||||
.handler = {&options.ignoreLiveness, true}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ struct CmdStoreGC : StoreCommand, MixDryRun
|
|||
{
|
||||
addFlag({
|
||||
.longName = "max",
|
||||
.description = "stop after freeing `n` bytes of disk space",
|
||||
.description = "Stop after freeing *n* bytes of disk space.",
|
||||
.labels = {"n"},
|
||||
.handler = {&options.maxFreed}
|
||||
});
|
||||
|
|
|
@ -19,14 +19,14 @@ struct CmdUpgradeNix : MixDryRun, StoreCommand
|
|||
addFlag({
|
||||
.longName = "profile",
|
||||
.shortName = 'p',
|
||||
.description = "the Nix profile to upgrade",
|
||||
.description = "The path to the Nix profile to upgrade.",
|
||||
.labels = {"profile-dir"},
|
||||
.handler = {&profileDir}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "nix-store-paths-url",
|
||||
.description = "URL of the file that contains the store paths of the latest Nix release",
|
||||
.description = "The URL of the file that contains the store paths of the latest Nix release.",
|
||||
.labels = {"url"},
|
||||
.handler = {&storePathsUrl}
|
||||
});
|
||||
|
|
|
@ -18,13 +18,13 @@ struct CmdVerify : StorePathsCommand
|
|||
|
||||
CmdVerify()
|
||||
{
|
||||
mkFlag(0, "no-contents", "do not verify the contents of each store path", &noContents);
|
||||
mkFlag(0, "no-trust", "do not verify whether each store path is trusted", &noTrust);
|
||||
mkFlag(0, "no-contents", "Do not verify the contents of each store path.", &noContents);
|
||||
mkFlag(0, "no-trust", "Do not verify whether each store path is trusted.", &noTrust);
|
||||
|
||||
addFlag({
|
||||
.longName = "substituter",
|
||||
.shortName = 's',
|
||||
.description = "use signatures from specified store",
|
||||
.description = "Use signatures from the specified store.",
|
||||
.labels = {"store-uri"},
|
||||
.handler = {[&](std::string s) { substituterUris.push_back(s); }}
|
||||
});
|
||||
|
@ -32,7 +32,7 @@ struct CmdVerify : StorePathsCommand
|
|||
addFlag({
|
||||
.longName = "sigs-needed",
|
||||
.shortName = 'n',
|
||||
.description = "require that each path has at least N valid signatures",
|
||||
.description = "Require that each path has at least *n* valid signatures.",
|
||||
.labels = {"n"},
|
||||
.handler = {&sigsNeeded}
|
||||
});
|
||||
|
|
|
@ -40,7 +40,7 @@ struct CmdWhyDepends : SourceExprCommand
|
|||
addFlag({
|
||||
.longName = "all",
|
||||
.shortName = 'a',
|
||||
.description = "show all edges in the dependency graph leading from 'package' to 'dependency', rather than just a shortest path",
|
||||
.description = "Show all edges in the dependency graph leading from *package* to *dependency*, rather than just a shortest path.",
|
||||
.handler = {&all, true},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue