summary refs log tree commit diff
path: root/pkgs/build-support/trivial-builders.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-27 16:36:16 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-29 13:06:43 +0200
commit97bfc2fac92d90c668ae1ec078356d0bd0a9ddb7 (patch)
treea4374e67bc2fda865d93133423cfb69c5018f95e /pkgs/build-support/trivial-builders.nix
parent0cb16a6955ff6ef447a81caab02a8389b2d19dd4 (diff)
downloadnixpkgs-97bfc2fac92d90c668ae1ec078356d0bd0a9ddb7.tar
nixpkgs-97bfc2fac92d90c668ae1ec078356d0bd0a9ddb7.tar.gz
nixpkgs-97bfc2fac92d90c668ae1ec078356d0bd0a9ddb7.tar.bz2
nixpkgs-97bfc2fac92d90c668ae1ec078356d0bd0a9ddb7.tar.lz
nixpkgs-97bfc2fac92d90c668ae1ec078356d0bd0a9ddb7.tar.xz
nixpkgs-97bfc2fac92d90c668ae1ec078356d0bd0a9ddb7.tar.zst
nixpkgs-97bfc2fac92d90c668ae1ec078356d0bd0a9ddb7.zip
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.nix20
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 =