about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/common-eval-args.hh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libexpr/common-eval-args.hh')
-rw-r--r--third_party/nix/src/libexpr/common-eval-args.hh26
1 files changed, 26 insertions, 0 deletions
diff --git a/third_party/nix/src/libexpr/common-eval-args.hh b/third_party/nix/src/libexpr/common-eval-args.hh
new file mode 100644
index 000000000000..5e0e8af79cbe
--- /dev/null
+++ b/third_party/nix/src/libexpr/common-eval-args.hh
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "libutil/args.hh"
+
+namespace nix {
+
+class Store;
+class EvalState;
+class Bindings;
+
+enum ArgType { kArgTypeString, kArgTypeExpr };
+
+struct MixEvalArgs : virtual Args {
+  MixEvalArgs();
+
+  std::unique_ptr<Bindings> getAutoArgs(EvalState& state);
+
+  Strings searchPath;
+
+ private:
+  std::map<std::string, std::pair<ArgType, std::string>> auto_args_;
+};
+
+Path lookupFileArg(EvalState& state, std::string s);
+
+}  // namespace nix