summary refs log tree commit diff
path: root/pkgs/build-support/cc-wrapper
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-09-18 21:12:23 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-09-19 16:45:24 -0400
commit6c74ee68b9d985a9a5b26eb9e6ee1bfc06283bee (patch)
tree812917bd5e9d73d60b87768dc103e0bbb49a185f /pkgs/build-support/cc-wrapper
parent6d423da7cc696f6a307dca72ca9634ac1ee0ecc4 (diff)
downloadnixpkgs-6c74ee68b9d985a9a5b26eb9e6ee1bfc06283bee.tar
nixpkgs-6c74ee68b9d985a9a5b26eb9e6ee1bfc06283bee.tar.gz
nixpkgs-6c74ee68b9d985a9a5b26eb9e6ee1bfc06283bee.tar.bz2
nixpkgs-6c74ee68b9d985a9a5b26eb9e6ee1bfc06283bee.tar.lz
nixpkgs-6c74ee68b9d985a9a5b26eb9e6ee1bfc06283bee.tar.xz
nixpkgs-6c74ee68b9d985a9a5b26eb9e6ee1bfc06283bee.tar.zst
nixpkgs-6c74ee68b9d985a9a5b26eb9e6ee1bfc06283bee.zip
cc-wrapper, cc-wrapper-old: Simplify shell logic
1. `crossDrv` is now the default so we don't need to worry about that in
   build != host builds.

2. shell is the build time shell, so `wrapCCCross` doesn't need to
   worry, as build == host.

3. `shell.shellPath` will always be appended where useful.

4. Complicated `shell == ""` logic served no purpose.
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix7
1 files changed, 2 insertions, 5 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index 999faf756ed..866be9cded9 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -86,7 +86,8 @@ stdenv.mkDerivation {
 
   preferLocalBuild = true;
 
-  inherit cc shell libc_bin libc_dev libc_lib binutils_bin coreutils_bin;
+  inherit cc libc_bin libc_dev libc_lib binutils_bin coreutils_bin;
+  shell = getBin shell + shell.shellPath or "";
   gnugrep_bin = if nativeTools then "" else gnugrep;
 
   binPrefix = prefix;
@@ -384,10 +385,6 @@ stdenv.mkDerivation {
   # for substitution in utils.sh
   expandResponseParams = "${expand-response-params}/bin/expand-response-params";
 
-  crossAttrs = {
-    shell = shell.crossDrv + shell.crossDrv.shellPath;
-  };
-
   meta =
     let cc_ = if cc != null then cc else {}; in
     (if cc_ ? meta then removeAttrs cc.meta ["priority"] else {}) //