mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
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>
This commit is contained in:
parent
0432bc52ea
commit
0c3e8a616e
2 changed files with 15 additions and 0 deletions
|
@ -35,6 +35,7 @@
|
|||
<arg choice='plain'>
|
||||
<option>--eval-only</option>
|
||||
<arg><option>--strict</option></arg>
|
||||
<arg><option>--no-readonly-mode</option></arg>
|
||||
</arg>
|
||||
<arg choice='plain'><option>--find-file</option></arg>
|
||||
</group>
|
||||
|
@ -140,6 +141,17 @@ policies.</para>
|
|||
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><option>--no-readonly-mode</option></term>
|
||||
|
||||
<listitem><para>When used with <option>--eval-only</option>,
|
||||
perform evaluation in read/write mode so nix language features
|
||||
that require it will still work (at the cost of needing to do
|
||||
instantiation of every evaluated derivation).</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<variablelist condition="manpage">
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue