From 97bfc2fac92d90c668ae1ec078356d0bd0a9ddb7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 27 Sep 2016 16:36:16 +0200 Subject: runCommand: Use stdenvNoCC This ensures that most "trivial" derivations used to build NixOS configurations no longer depend on GCC. For commands that do invoke gcc, there is runCommandCC. --- pkgs/build-support/trivial-builders.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 398426bf9a4..d6f390ddfb1 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -1,16 +1,24 @@ -{ lib, stdenv, lndir }: +{ lib, stdenv, stdenvNoCC, lndir }: -rec { +let - # Run the shell command `buildCommand' to produce a store path named - # `name'. The attributes in `env' are added to the environment - # prior to running the command. - runCommand = name: env: buildCommand: + runCommand' = stdenv: name: env: buildCommand: stdenv.mkDerivation ({ inherit name buildCommand; passAsFile = [ "buildCommand" ]; } // env); +in + +rec { + + # Run the shell command `buildCommand' to produce a store path named + # `name'. The attributes in `env' are added to the environment + # prior to running the command. + runCommand = runCommandNoCC; + runCommandNoCC = runCommand' stdenvNoCC; + runCommandCC = runCommand' stdenv; + # Create a single file. writeTextFile = -- cgit 1.4.1