summary refs log tree commit diff
path: root/pkgs/build-support/cc-wrapper/default.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-07-05 21:47:48 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-07-07 12:55:02 -0400
commita302d7360f201cc4fcfb4a43a432b31536795507 (patch)
tree29df099a1fabe012311c9db0ce7488b2f53f95f1 /pkgs/build-support/cc-wrapper/default.nix
parentafc20239939829490e2d7a3beb7028b7c1dcc803 (diff)
downloadnixpkgs-a302d7360f201cc4fcfb4a43a432b31536795507.tar
nixpkgs-a302d7360f201cc4fcfb4a43a432b31536795507.tar.gz
nixpkgs-a302d7360f201cc4fcfb4a43a432b31536795507.tar.bz2
nixpkgs-a302d7360f201cc4fcfb4a43a432b31536795507.tar.lz
nixpkgs-a302d7360f201cc4fcfb4a43a432b31536795507.tar.xz
nixpkgs-a302d7360f201cc4fcfb4a43a432b31536795507.tar.zst
nixpkgs-a302d7360f201cc4fcfb4a43a432b31536795507.zip
top-level: {build,host,target}Platform are defined in the stdenv instead
See #27069 for a discussion of this
Diffstat (limited to 'pkgs/build-support/cc-wrapper/default.nix')
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index 935e6fb6267..e6576e5a389 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -10,7 +10,6 @@
 , zlib ? null, extraPackages ? [], extraBuildCommands ? ""
 , dyld ? null # TODO: should this be a setup-hook on dyld?
 , isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null
-, hostPlatform, targetPlatform
 , runCommand ? null
 }:
 
@@ -22,12 +21,14 @@ assert !nativeTools ->
 assert !(nativeLibc && noLibc);
 assert (noLibc || nativeLibc) == (libc == null);
 
-assert targetPlatform != hostPlatform -> runCommand != null;
+assert stdenv.targetPlatform != stdenv.hostPlatform -> runCommand != null;
 
 # For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper.
 assert cc.langVhdl or false -> zlib != null;
 
 let
+  inherit (stdenv) hostPlatform targetPlatform;
+
   # Prefix for binaries. Customarily ends with a dash separator.
   #
   # TODO(@Ericson2314) Make unconditional, or optional but always true by