aboutsummaryrefslogtreecommitdiff
path: root/src/nix/eval.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-04 20:45:40 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-20 10:39:18 -0500
commit0258ac9c2a49eb0cc632bc02d72093392bd37bfc (patch)
tree32fd9fecc91bd51ab81046bb5cc1fa98be3f997b /src/nix/eval.cc
parent924ef6761bbbc75fda3cf85dc1c8d782130291b4 (diff)
Make `--read-only` a separate mixin
It is independent of SourceExprCommand, which is about parsing installables, except for the fact that parsing installables is one of the many things influenced by read-only mode.
Diffstat (limited to 'src/nix/eval.cc')
-rw-r--r--src/nix/eval.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/eval.cc b/src/nix/eval.cc
index ccee074e9..a579213fd 100644
--- a/src/nix/eval.cc
+++ b/src/nix/eval.cc
@@ -11,13 +11,13 @@
using namespace nix;
-struct CmdEval : MixJSON, InstallableCommand
+struct CmdEval : MixJSON, InstallableCommand, MixReadOnlyOption
{
bool raw = false;
std::optional<std::string> apply;
std::optional<Path> writeTo;
- CmdEval() : InstallableCommand(true /* supportReadOnlyMode */)
+ CmdEval() : InstallableCommand()
{
addFlag({
.longName = "raw",