aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/common-eval-args.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/common-eval-args.cc')
-rw-r--r--src/libexpr/common-eval-args.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libexpr/common-eval-args.cc b/src/libexpr/common-eval-args.cc
index 13950ab8d..7c0d268bd 100644
--- a/src/libexpr/common-eval-args.cc
+++ b/src/libexpr/common-eval-args.cc
@@ -26,6 +26,22 @@ MixEvalArgs::MixEvalArgs()
.description("add a path to the list of locations used to look up <...> file names")
.label("path")
.handler([&](std::string s) { searchPath.push_back(s); });
+
+ mkFlag()
+ .longName("impure")
+ .description("allow access to mutable paths and repositories")
+ .handler([&](std::vector<std::string> ss) {
+ evalSettings.pureEval = false;
+ });
+
+ mkFlag()
+ .longName("override-flake")
+ .labels({"original-ref", "resolved-ref"})
+ .description("override a flake registry value")
+ .arity(2)
+ .handler([&](std::vector<std::string> ss) {
+ registryOverrides.push_back(std::make_pair(ss[0], ss[1]));
+ });
}
Bindings * MixEvalArgs::getAutoArgs(EvalState & state)