about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2014-02-04T14·17-0500
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-07T17·03+0100
commit0c3e8a616e8e243ee45c78491fe86f50230d82b9 (patch)
tree0e5c7248af0162401231e9d84a958de0601ce1b4 /src
parent0432bc52ea21bb7b60477965054362f7414c569f (diff)
nix-instantiate: Add a --no-readonly-mode flag
This allows running nix-instantiate --eval-only without performing the
evaluation in readonly mode, letting features like import from
derivation and automatic substitution of builtins.storePath paths work.

Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'src')
-rw-r--r--src/nix-instantiate/nix-instantiate.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc
index b7f944062cec..1f4d1ffab8fb 100644
--- a/src/nix-instantiate/nix-instantiate.cc
+++ b/src/nix-instantiate/nix-instantiate.cc
@@ -107,6 +107,9 @@ void run(Strings args)
             settings.readOnlyMode = true;
             evalOnly = true;
         }
+        else if (arg == "--no-readonly-mode") {
+            settings.readOnlyMode = false;
+        }
         else if (arg == "--parse-only") {
             settings.readOnlyMode = true;
             parseOnly = evalOnly = true;