aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/common-eval-args.hh
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-02-19 16:59:52 +0100
committerNaïm Favier <n@monade.li>2022-03-07 12:01:54 +0100
commitda7d8daa77c2cce5805947a012060b02be9e4a43 (patch)
treee1975cf7843ce60e93c263fdac1bd066908b3fb1 /src/libcmd/common-eval-args.hh
parent55c6906701ee7fc7e915f7889fea86957b020f94 (diff)
Add shell completion for --override-flake
Requires moving the MixEvalArgs class from libexpr to libcmd because that's where completeFlakeRef is.
Diffstat (limited to 'src/libcmd/common-eval-args.hh')
-rw-r--r--src/libcmd/common-eval-args.hh27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/libcmd/common-eval-args.hh b/src/libcmd/common-eval-args.hh
new file mode 100644
index 000000000..03fa226aa
--- /dev/null
+++ b/src/libcmd/common-eval-args.hh
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "args.hh"
+
+namespace nix {
+
+class Store;
+class EvalState;
+class Bindings;
+
+struct MixEvalArgs : virtual Args
+{
+ MixEvalArgs();
+
+ Bindings * getAutoArgs(EvalState & state);
+
+ Strings searchPath;
+
+ std::optional<std::string> evalStoreUrl;
+
+private:
+ std::map<std::string, std::string> autoArgs;
+};
+
+Path lookupFileArg(EvalState & state, std::string_view s);
+
+}