diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-10-24 12:45:11 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-10-24 12:58:34 +0200 |
commit | 0d59f1ca49c9f7f3b2edaadcf590360ec66a6257 (patch) | |
tree | a03d53d84fb61eb354e2634705d8a076f0c1c76d /src/nix/command.hh | |
parent | 25f32625e2f2a3a1e1b3a3811da82f21c3a3b880 (diff) |
nix: Respect -I, --arg, --argstr
Also, random cleanup to argument handling.
Diffstat (limited to 'src/nix/command.hh')
-rw-r--r-- | src/nix/command.hh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nix/command.hh b/src/nix/command.hh index 77ca8cfb6..daa3b3fa7 100644 --- a/src/nix/command.hh +++ b/src/nix/command.hh @@ -1,10 +1,12 @@ #pragma once #include "args.hh" +#include "common-eval-args.hh" namespace nix { struct Value; +struct Bindings; class EvalState; /* A command is an argument parser that can be executed by calling its @@ -68,14 +70,11 @@ struct Installable } }; -struct SourceExprCommand : virtual Args, StoreCommand +struct SourceExprCommand : virtual Args, StoreCommand, MixEvalArgs { Path file; - SourceExprCommand() - { - mkFlag('f', "file", "file", "evaluate FILE rather than the default", &file); - } + SourceExprCommand(); /* Return a value representing the Nix expression from which we are installing. This is either the file specified by ‘--file’, @@ -111,7 +110,7 @@ struct InstallablesCommand : virtual Args, SourceExprCommand private: - Strings _installables; + std::vector<std::string> _installables; }; struct InstallableCommand : virtual Args, SourceExprCommand |