aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-04-15 13:45:51 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-04-15 13:45:51 +0200
commit84c12dbd7c8f2b34c46908f4a0c43cbb86023f20 (patch)
tree16e46c508f3e52649585f65ff59ea9ab8449cca7
parenta12cd535672737d40759e02356cf0b418182c619 (diff)
Move --impure to MixEvalArgs
-rw-r--r--src/libexpr/common-eval-args.cc7
-rw-r--r--src/nix/installables.cc7
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libexpr/common-eval-args.cc b/src/libexpr/common-eval-args.cc
index 37c74a94b..3e5400052 100644
--- a/src/libexpr/common-eval-args.cc
+++ b/src/libexpr/common-eval-args.cc
@@ -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)
diff --git a/src/nix/installables.cc b/src/nix/installables.cc
index fc2c34861..9bc5ff41f 100644
--- a/src/nix/installables.cc
+++ b/src/nix/installables.cc
@@ -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()