diff --git a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix index d25edff49560..e8302a82555f 100644 --- a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix +++ b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix @@ -7,6 +7,7 @@ , wrapCCWith , buildIosSdk, targetIosSdkPkgs , xcode +, lib }: let @@ -48,7 +49,7 @@ rec { tr '\n' ' ' < $out/nix-support/cc-cflags > cc-cflags.tmp 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 "-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 '' + stdenv.lib.optionalString (sdk.platform == "iPhoneSimulator") '' echo "-mios-simulator-version-min=${minSdkVersion}" >> $out/nix-support/cc-cflags '' + stdenv.lib.optionalString (sdk.platform == "iPhoneOS") ''