diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-04 18:27:17 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-04 18:30:02 -0500 |
commit | 44bea52ae3ca9569250eb1f50100f2c3260cc688 (patch) | |
tree | 0a9fed384c25d9b6922ef391c83782bbf2b2f96b /src/libcmd/command.cc | |
parent | 6352e20bc8dba9477e25eedbe7bea91cbe1614f9 (diff) |
Scope down `--derivation` to just the commands that use it
Per the old FIXME, this flag was on too many commands, and mostly
ignored. Now it is just on the commands where it actually has an effect.
Per https://github.com/NixOS/nix/issues/7261, I would still like to get
rid of it entirely, but that is a separate project. This change should
be good with or without doing that.
Diffstat (limited to 'src/libcmd/command.cc')
-rw-r--r-- | src/libcmd/command.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index 0740ea960..517cdf617 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -127,6 +127,16 @@ ref<EvalState> EvalCommand::getEvalState() return ref<EvalState>(evalState); } +MixOperateOnOptions::MixOperateOnOptions() +{ + addFlag({ + .longName = "derivation", + .description = "Operate on the [store derivation](../../glossary.md#gloss-store-derivation) rather than its outputs.", + .category = installablesCategory, + .handler = {&operateOn, OperateOn::Derivation}, + }); +} + BuiltPathsCommand::BuiltPathsCommand(bool recursive) : recursive(recursive) { |