diff options
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 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 = |