about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authornicoo2024-08-08 16:48:57 +0000
committernicoo2024-08-19 19:16:42 +0000
commite3d7e7f2a7e54978dfeccb95bb0fb9b6761fc0f7 (patch)
tree3c89f1acfd34805580bd50ce31aa3a37d69e046f /doc
parent482d6eaab2803e5d3be84124d0677d9dd5234a29 (diff)
doc/build-helpers: add note relating `runCommand` and `runCommandWith`
Diffstat (limited to 'doc')
-rw-r--r--doc/build-helpers/trivial-build-helpers.chapter.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/build-helpers/trivial-build-helpers.chapter.md b/doc/build-helpers/trivial-build-helpers.chapter.md
index 3d2c7f166710..42e36821d9ec 100644
--- a/doc/build-helpers/trivial-build-helpers.chapter.md
+++ b/doc/build-helpers/trivial-build-helpers.chapter.md
@@ -126,6 +126,24 @@ runCommand "my-example" {} ''
 ```
 :::
 
+::: {.note}
+`runCommand name derivationArgs buildCommand` is equivalent to
+```nix
+runCommandWith {
+  inherit name derivationArgs;
+  stdenv = stdenvNoCC;
+} buildCommand
+```
+
+Likewise, `runCommandCC name derivationArgs buildCommand` is equivalent to
+```nix
+runCommandWith {
+  inherit name derivationArgs;
+} buildCommand
+```
+:::
+
+
 ## `runCommandLocal` {#trivial-builder-runCommandLocal}
 
 Variant of `runCommand` that forces the derivation to be built locally, it is not substituted. This is intended for very cheap commands (<1s execution time). It saves on the network round-trip and can speed up a build.