diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-27 16:36:16 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-29 13:06:43 +0200 |
commit | 97bfc2fac92d90c668ae1ec078356d0bd0a9ddb7 (patch) | |
tree | a4374e67bc2fda865d93133423cfb69c5018f95e /pkgs/build-support/trivial-builders.nix | |
parent | 0cb16a6955ff6ef447a81caab02a8389b2d19dd4 (diff) |
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.
Diffstat (limited to 'pkgs/build-support/trivial-builders.nix')
-rw-r--r-- | pkgs/build-support/trivial-builders.nix | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 398426bf9a48..d6f390ddfb1c 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 = |