From 0828e2d8c369604c56219bd7085256b984087280 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 20 Aug 2018 14:43:41 -0400 Subject: 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. --- .../darwin/apple-source-releases/libiconv/default.nix | 6 +++--- pkgs/os-specific/darwin/cctools/port.nix | 13 ++++++------- pkgs/os-specific/darwin/xcode/default.nix | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) (limited to 'pkgs/os-specific/darwin') diff --git a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix index 3d62c396122..ea5a5953606 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix @@ -1,6 +1,6 @@ -{ stdenv, appleDerivation, lib, targetPlatform -, enableStatic ? targetPlatform.isiOS -, enableShared ? !targetPlatform.isiOS +{ stdenv, appleDerivation, lib +, enableStatic ? stdenv.targetPlatform.isiOS +, enableShared ? !stdenv.targetPlatform.isiOS }: appleDerivation { 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; diff --git a/pkgs/os-specific/darwin/xcode/default.nix b/pkgs/os-specific/darwin/xcode/default.nix index 910f1b91c21..369529d7167 100644 --- a/pkgs/os-specific/darwin/xcode/default.nix +++ b/pkgs/os-specific/darwin/xcode/default.nix @@ -1,4 +1,4 @@ -{ stdenv, requireFile, targetPlatform, lib }: +{ stdenv, requireFile, lib }: let requireXcode = version: sha256: let @@ -46,5 +46,5 @@ in lib.makeExtensible (self: { xcode_9_1 = requireXcode "9.1" "0ab1403wy84ys3yn26fj78cazhpnslmh3nzzp1wxib3mr1afjvic"; xcode_9_2 = requireXcode "9.2" "1bgfgdp266cbbqf2axcflz92frzvhi0qw0jdkcw6r85kdpc8dj4c"; xcode_9_4 = requireXcode "9.4" "6731381785075602a52489f7ea47ece8f6daf225007ba3ffae1fd59b1c0b5f01"; - xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if targetPlatform.useiOSPrebuilt then targetPlatform.xcodeVer else "8.2")}"; + xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if stdenv.targetPlatform.useiOSPrebuilt then stdenv.targetPlatform.xcodeVer else "8.2")}"; }) -- cgit 1.4.1