diff options
author | Matthew Justin Bauer <mjbauer95@gmail.com> | 2018-06-26 10:56:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-26 10:56:57 -0400 |
commit | e4d9ce90611a90d7855dc234fb33e89217cd16ed (patch) | |
tree | 93f353ae48eb06424a1b008bb1b175eb8bbfb2bc /pkgs/os-specific/darwin | |
parent | 9c5b6bb81452f1e09f7c6abd984f9b3042598601 (diff) | |
parent | 0bfffbc5e19f1a16c19f3cec5272174555006869 (diff) | |
download | nixlib-e4d9ce90611a90d7855dc234fb33e89217cd16ed.tar nixlib-e4d9ce90611a90d7855dc234fb33e89217cd16ed.tar.gz nixlib-e4d9ce90611a90d7855dc234fb33e89217cd16ed.tar.bz2 nixlib-e4d9ce90611a90d7855dc234fb33e89217cd16ed.tar.lz nixlib-e4d9ce90611a90d7855dc234fb33e89217cd16ed.tar.xz nixlib-e4d9ce90611a90d7855dc234fb33e89217cd16ed.tar.zst nixlib-e4d9ce90611a90d7855dc234fb33e89217cd16ed.zip |
Merge pull request #42599 from obsidiansystems/xcodever-in-system
xcode: add xcodePlatform to system
Diffstat (limited to 'pkgs/os-specific/darwin')
-rw-r--r-- | pkgs/os-specific/darwin/xcode/sdk-pkgs.nix (renamed from pkgs/os-specific/darwin/ios-sdk-pkgs/default.nix) | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/os-specific/darwin/ios-sdk-pkgs/default.nix b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix index ebca738431c3..d5ed21cd9e24 100644 --- a/pkgs/os-specific/darwin/ios-sdk-pkgs/default.nix +++ b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix @@ -25,9 +25,9 @@ rec { sdk = rec { name = "ios-sdk"; type = "derivation"; - outPath = xcode + "/Contents/Developer/Platforms/iPhone${sdkType}.platform/Developer/SDKs/iPhone${sdkType}${version}.sdk"; + outPath = xcode + "/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${version}.sdk"; - sdkType = if targetPlatform.isiPhoneSimulator then "Simulator" else "OS"; + platform = targetPlatform.xcodePlatform; version = targetPlatform.sdkVer; }; @@ -48,7 +48,10 @@ rec { mv cc-cflags.tmp $out/nix-support/cc-cflags echo "-target ${targetPlatform.config} -arch ${iosPlatformArch targetPlatform}" >> $out/nix-support/cc-cflags echo "-isystem ${sdk}/usr/include -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++" >> $out/nix-support/cc-cflags - echo "${if targetPlatform.isiPhoneSimulator then "-mios-simulator-version-min" else "-miphoneos-version-min"}=${minSdkVersion}" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (sdk.platform == "iPhoneSimulator") '' + echo "-mios-simulator-version-min=${minSdkVersion}" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (sdk.platform == "iPhoneOS") '' + echo "-miphoneos-version-min=${minSdkVersion}" >> $out/nix-support/cc-cflags ''; }) // { inherit sdk; @@ -60,7 +63,7 @@ rec { }; } '' if ! [ -d ${sdk} ]; then - echo "You must have version ${sdk.version} of the iPhone${sdk.sdkType} sdk installed at ${sdk}" >&2 + echo "You must have version ${sdk.version} of the ${sdk.platform} sdk installed at ${sdk}" >&2 exit 1 fi ln -s ${sdk}/usr $out |