From c5c5465fe4c8007e954ae732a27ab806cca3aab6 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 3 Dec 2019 19:09:58 +0100 Subject: [PATCH] pkgs/build-support/trivial-builders: remove runCommandCCLocal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We shouldn’t force the user to have a C compiler in scope, just because the derivation is forced to build locally. That can’t be counted as “lightweight” anymore. Co-Authored-By: Silvan Mosberger --- doc/builders/trivial-builders.xml | 4 ++-- pkgs/build-support/trivial-builders.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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.