8 , buildIosSdk, targetIosSdkPkgs
15 minSdkVersion = stdenv.targetPlatform.minSdkVersion or "9.0";
23 outPath = xcode + "/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${version}.sdk";
25 platform = stdenv.targetPlatform.xcodePlatform or "";
26 version = stdenv.targetPlatform.sdkVer or "";
29 binutils = wrapBintoolsWith {
30 libc = targetIosSdkPkgs.libraries;
31 bintools = binutils-unwrapped;
37 libc = targetIosSdkPkgs.libraries;
38 extraPackages = [ "${sdk}/System" ];
39 extraBuildCommands = ''
40 tr '\n' ' ' < $out/nix-support/cc-cflags > cc-cflags.tmp
41 mv cc-cflags.tmp $out/nix-support/cc-cflags
42 echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
43 echo "-isystem ${sdk}/usr/include${lib.optionalString (lib.versionAtLeast "10" sdk.version) " -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++"}" >> $out/nix-support/cc-cflags
44 ${lib.optionalString (lib.versionAtLeast sdk.version "14") "echo -isystem ${xcode}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 >> $out/nix-support/cc-cflags"}
50 libraries = let sdk = buildIosSdk; in runCommand "libSystem-prebuilt" {
55 if ! [ -d ${sdk} ]; then
56 echo "You must have version ${sdk.version} of the ${sdk.platform} sdk installed at ${sdk}" >&2