From 0d59f1ca49c9f7f3b2edaadcf590360ec66a6257 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Oct 2017 12:45:11 +0200 Subject: nix: Respect -I, --arg, --argstr Also, random cleanup to argument handling. --- src/nix/command.hh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/nix/command.hh') diff --git a/src/nix/command.hh b/src/nix/command.hh index 77ca8cfb64bf..daa3b3fa7030 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 _installables; }; struct InstallableCommand : virtual Args, SourceExprCommand -- cgit 1.4.1