summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2019-11-29 16:59:08 +0100
committerProfpatsch <mail@profpatsch.de>2019-12-04 21:17:01 +0100
commitfaa3e54fe0a926dee6e04c646881bdb627494300 (patch)
tree75cdf240d04d5e18bfdda5cc0f0fe695aff2cc10 /doc
parent8deaf41d60144551cc1ba98d695cc8390b85662b (diff)
downloadnixpkgs-faa3e54fe0a926dee6e04c646881bdb627494300.tar
nixpkgs-faa3e54fe0a926dee6e04c646881bdb627494300.tar.gz
nixpkgs-faa3e54fe0a926dee6e04c646881bdb627494300.tar.bz2
nixpkgs-faa3e54fe0a926dee6e04c646881bdb627494300.tar.lz
nixpkgs-faa3e54fe0a926dee6e04c646881bdb627494300.tar.xz
nixpkgs-faa3e54fe0a926dee6e04c646881bdb627494300.tar.zst
nixpkgs-faa3e54fe0a926dee6e04c646881bdb627494300.zip
doc/builders/trivial-builders: added runCommandLocal docs
The link in the note points to the `id` added in
https://github.com/NixOS/nix/pull/3255, so it might take some time to
start working correctly.
Diffstat (limited to 'doc')
-rw-r--r--doc/builders/trivial-builders.xml13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/builders/trivial-builders.xml b/doc/builders/trivial-builders.xml
index df0e38da1aa..18d1f9701a4 100644
--- a/doc/builders/trivial-builders.xml
+++ b/doc/builders/trivial-builders.xml
@@ -52,6 +52,19 @@
   </varlistentry>
   <varlistentry>
    <term>
+    <literal>runCommandLocal</literal>, <literal>runCommandCCLocal</literal>
+   </term>
+   <listitem>
+    <para>
+     Variants of <literal>runCommand</literal> and <literal>runCommandCC</literal> that force the derivation to be built locally, it is not substituted. This is intended for very cheap commands (&lt;1s execution time). It saves on the network roundrip and can speed up a build.
+    </para>
+    <note><para>
+      This sets <link xlink:href="https://nixos.org/nix/manual/#adv-attr-allowSubstitutes"><literal>allowSubstitutes</literal> to <literal>false</literal></link>, so only use <literal>runCommandLocal</literal> if you are certain the user will always have a builder for the <literal>system</literal> of the derivation. This should be true for most trivial use cases (e.g. just copying some files to a different location or adding symlinks), because there the <literal>system</literal> is usually the same as <literal>builtins.currentSystem</literal>.
+    </para></note>
+   </listitem>
+  </varlistentry>
+  <varlistentry>
+   <term>
     <literal>writeTextFile</literal>, <literal>writeText</literal>, <literal>writeTextDir</literal>, <literal>writeScript</literal>, <literal>writeScriptBin</literal>
    </term>
    <listitem>