Move --impure to MixEvalArgs

This commit is contained in:
Eelco Dolstra 2019-04-15 13:45:51 +02:00
parent a12cd53567
commit 84c12dbd7c
2 changed files with 7 additions and 7 deletions

View file

@ -26,6 +26,13 @@ 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;
});
}
Bindings * MixEvalArgs::getAutoArgs(EvalState & state)

View file

@ -20,13 +20,6 @@ SourceExprCommand::SourceExprCommand()
.label("file")
.description("evaluate a set of attributes from FILE (deprecated)")
.dest(&file);
mkFlag()
.longName("impure")
.description("allow access to mutable paths and repositories")
.handler([&](std::vector<std::string> ss) {
evalSettings.pureEval = false;
});
}
ref<EvalState> SourceExprCommand::getEvalState()