diff options
author | Profpatsch <mail@profpatsch.de> | 2019-12-03 18:01:45 +0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2019-12-03 18:01:45 +0100 |
commit | 7395e091c535df996f2dde3fb8170f2a211fbae5 (patch) | |
tree | cff3a8710fba7b68fd45828310366baacb6e8d37 /doc/manual/expressions/advanced-attributes.xml | |
parent | e59e2b2951706c3d8ba9374ceb567499f064daf9 (diff) |
doc/manual: add note to `allowSubstitutes` advanced attribute
Diffstat (limited to 'doc/manual/expressions/advanced-attributes.xml')
-rw-r--r-- | doc/manual/expressions/advanced-attributes.xml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/manual/expressions/advanced-attributes.xml b/doc/manual/expressions/advanced-attributes.xml index 07b0d97d3..e1fbe6291 100644 --- a/doc/manual/expressions/advanced-attributes.xml +++ b/doc/manual/expressions/advanced-attributes.xml @@ -325,12 +325,23 @@ big = "a very long string"; <varlistentry><term><varname>allowSubstitutes</varname></term> - <listitem><para>If this attribute is set to + <listitem> + <para>If this attribute is set to <literal>false</literal>, then Nix will always build this derivation; it will not try to substitute its outputs. This is useful for very trivial derivations (such as <function>writeText</function> in Nixpkgs) that are cheaper to - build than to substitute from a binary cache.</para></listitem> + build than to substitute from a binary cache.</para> + + <note><para>You need to have a builder configured which satisfies + the derivation’s <literal>system</literal> attribute, since the + derivation cannot be substituted. Thus it is usually a good idea + to align <literal>system</literal> with + <literal>builtins.currentSystem</literal> when setting + <literal>allowSubstitutes</literal> to <literal>false</literal>. + For most trivial derivations this should be the case. + </para></note> + </listitem> </varlistentry> |