$xcodePath -> $SDKROOT

SDKROOT is standard. In particular, this fixes the cmake build on
Mac OS X 10.9.

+10 -10
+5 -5
pkgs/development/compilers/gcc/4.8/default.nix
··· 309 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" 310 export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" 311 '' + stdenv.lib.optionalString stdenv.isDarwin '' 312 - if xcodePath=$(/usr/bin/xcrun --show-sdk-path); then 313 - configureFlagsArray+=(--with-native-system-header-dir=$xcodePath/usr/include) 314 makeFlagsArray+=( \ 315 - CFLAGS_FOR_BUILD=-F$xcodePath/System/Library/Frameworks \ 316 - CFLAGS_FOR_TARGET=-F$xcodePath/System/Library/Frameworks \ 317 - FLAGS_FOR_TARGET=-F$xcodePath/System/Library/Frameworks \ 318 ) 319 fi 320 '';
··· 309 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" 310 export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" 311 '' + stdenv.lib.optionalString stdenv.isDarwin '' 312 + if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then 313 + configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) 314 makeFlagsArray+=( \ 315 + CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ 316 + CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ 317 + FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ 318 ) 319 fi 320 '';
+1 -1
pkgs/development/libraries/libsamplerate/default.nix
··· 19 '' 20 # need headers from the Carbon.framework in /System/Library/Frameworks to 21 # compile this on darwin -- not sure how to handle 22 - NIX_CFLAGS_COMPILE+=" -I$xcodePath/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" 23 24 substituteInPlace examples/Makefile --replace "-fpascal-strings" "" 25 '';
··· 19 '' 20 # need headers from the Carbon.framework in /System/Library/Frameworks to 21 # compile this on darwin -- not sure how to handle 22 + NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" 23 24 substituteInPlace examples/Makefile --replace "-fpascal-strings" "" 25 '';
+1 -1
pkgs/development/libraries/libsndfile/default.nix
··· 14 # compile this on darwin -- not sure how to handle 15 preConfigure = stdenv.lib.optionalString stdenv.isDarwin 16 '' 17 - NIX_CFLAGS_COMPILE+=" -I$xcodePath/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" 18 ''; 19 20 # Needed on Darwin.
··· 14 # compile this on darwin -- not sure how to handle 15 preConfigure = stdenv.lib.optionalString stdenv.isDarwin 16 '' 17 + NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" 18 ''; 19 20 # Needed on Darwin.
+3 -3
pkgs/stdenv/nix/default.nix
··· 15 stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" 16 xargsFlags=" " 17 export MACOSX_DEPLOYMENT_TARGET=10.6 18 - xcodePath=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true) 19 - export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $xcodePath/usr/include -F$xcodePath/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations" 20 - export NIX_LDFLAGS_AFTER+=" -L$xcodePath/usr/lib" 21 '' else ""); 22 23 initialPath = (import ../common-path.nix) {pkgs = pkgs;};
··· 15 stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" 16 xargsFlags=" " 17 export MACOSX_DEPLOYMENT_TARGET=10.6 18 + SDKROOT=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true) 19 + export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$xcodePath/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations" 20 + export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib" 21 '' else ""); 22 23 initialPath = (import ../common-path.nix) {pkgs = pkgs;};