diff --git a/doc/builders/trivial-builders.xml b/doc/builders/trivial-builders.xml index d31c74e520f..94948c57b91 100644 --- a/doc/builders/trivial-builders.xml +++ b/doc/builders/trivial-builders.xml @@ -52,11 +52,11 @@ - runCommandLocal, runCommandCCLocal + runCommandLocal - Variants of runCommand and runCommandCC that force 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 roundrip and can speed up a build. + 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 roundrip and can speed up a build. This sets allowSubstitutes to false, so only use runCommandLocal if you are certain the user will always have a builder for the system 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 system is usually the same as builtins.currentSystem. diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 263320ca6d9..5210b7d7ba2 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -45,8 +45,8 @@ rec { runCommandNoCCLocal = runCommand' true stdenvNoCC; runCommandCC = runCommand' false stdenv; - runCommandCCLocal = runCommand' true stdenv; - + # `runCommandCCLocal` left out on purpose. + # We shouldn’t force the user to have a cc in scope. /* Writes a text file to the nix store. * The contents of text is added to the file in the store.