about summary refs log tree commit diff
path: root/src/nix/command.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-10-24T10·45+0200
committerEelco Dolstra <edolstra@gmail.com>2017-10-24T10·58+0200
commit0d59f1ca49c9f7f3b2edaadcf590360ec66a6257 (patch)
treea03d53d84fb61eb354e2634705d8a076f0c1c76d /src/nix/command.hh
parent25f32625e2f2a3a1e1b3a3811da82f21c3a3b880 (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.hh11
1 files changed, 5 insertions, 6 deletions
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<std::string> _installables;
 };
 
 struct InstallableCommand : virtual Args, SourceExprCommand