top-level: {build,host,target}Platform are defined in the stdenv instead

See #27069 for a discussion of this
This commit is contained in:
John Ericson
2017-07-07 12:55:02 -04:00
parent afc2023993
commit a302d7360f
12 changed files with 90 additions and 124 deletions
+3 -2
View File
@@ -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