summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/cctools
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-20 14:43:41 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-30 17:20:32 -0400
commit0828e2d8c369604c56219bd7085256b984087280 (patch)
tree507e0429674ad3a42bf5dcd11413d3c834f95c74 /pkgs/os-specific/darwin/cctools
parent2c2f1e37d4374ea61caefd9389927ea03df4ce31 (diff)
downloadnixpkgs-0828e2d8c369604c56219bd7085256b984087280.tar
nixpkgs-0828e2d8c369604c56219bd7085256b984087280.tar.gz
nixpkgs-0828e2d8c369604c56219bd7085256b984087280.tar.bz2
nixpkgs-0828e2d8c369604c56219bd7085256b984087280.tar.lz
nixpkgs-0828e2d8c369604c56219bd7085256b984087280.tar.xz
nixpkgs-0828e2d8c369604c56219bd7085256b984087280.tar.zst
nixpkgs-0828e2d8c369604c56219bd7085256b984087280.zip
treewide: Remove usage of remaining redundant platform compatability stuff
Want to get this out of here for 18.09, so it can be deprecated
thereafter.
Diffstat (limited to 'pkgs/os-specific/darwin/cctools')
-rw-r--r--pkgs/os-specific/darwin/cctools/port.nix13
1 files changed, 6 insertions, 7 deletions
diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix
index 995e9af38cb..fff6eaaa5c1 100644
--- a/pkgs/os-specific/darwin/cctools/port.nix
+++ b/pkgs/os-specific/darwin/cctools/port.nix
@@ -1,7 +1,6 @@
 { stdenv, fetchFromGitHub, autoconf, automake, libtool_2, autoreconfHook
 , libcxxabi, libuuid
 , libobjc ? null, maloader ? null
-, hostPlatform, targetPlatform
 , enableDumpNormalizedLibArgs ? false
 }:
 
@@ -12,17 +11,17 @@ let
   # 10.x. For 11.0 and higher we will need to upgrade to a newer cctools than the
   # default version here, which can support the new TBD format via Apple's
   # libtapi.
-  useOld = targetPlatform.isiOS;
+  useOld = stdenv.targetPlatform.isiOS;
 
   # The targetPrefix prepended to binary names to allow multiple binuntils on the
   # PATH to both be usable.
   targetPrefix = stdenv.lib.optionalString
-    (targetPlatform != hostPlatform)
-    "${targetPlatform.config}-";
+    (stdenv.targetPlatform != stdenv.hostPlatform)
+    "${stdenv.targetPlatform.config}-";
 in
 
 # Non-Darwin alternatives
-assert (!hostPlatform.isDarwin) -> maloader != null;
+assert (!stdenv.hostPlatform.isDarwin) -> maloader != null;
 
 assert enableDumpNormalizedLibArgs -> (!useOld);
 
@@ -77,7 +76,7 @@ let
     enableParallelBuilding = true;
 
     # TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
-    configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+    configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
 
     postPatch = ''
       sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp
@@ -131,7 +130,7 @@ let
     };
 
     meta = {
-      broken = !targetPlatform.isDarwin; # Only supports darwin targets
+      broken = !stdenv.targetPlatform.isDarwin; # Only supports darwin targets
       homepage = http://www.opensource.apple.com/source/cctools/;
       description = "MacOS Compiler Tools (cross-platform port)";
       license = stdenv.lib.licenses.apsl20;