Set SDKROOT etc. in stdenvNative

Fixes a build failure in gawk with Xcode 6.1 on 10.9.
This commit is contained in:
Eelco Dolstra 2014-11-04 16:33:54 +01:00
parent 7495c61d49
commit e575d739da
3 changed files with 11 additions and 10 deletions

View File

@ -11,13 +11,7 @@ import ../generic rec {
export NIX_IGNORE_LD_THROUGH_GCC=1 export NIX_IGNORE_LD_THROUGH_GCC=1
export NIX_DONT_SET_RPATH=1 export NIX_DONT_SET_RPATH=1
export NIX_NO_SELF_RPATH=1 export NIX_NO_SELF_RPATH=1
dontFixLibtool=1 ${import ./prehook.nix}
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
xargsFlags=" "
export MACOSX_DEPLOYMENT_TARGET=10.9
export SDKROOT=$(/usr/bin/xcrun --sdk macosx10.9 --show-sdk-path 2> /dev/null || true)
export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$SDKROOT/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations"
export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib"
''; '';
initialPath = (import ../common-path.nix) {pkgs = pkgs;}; initialPath = (import ../common-path.nix) {pkgs = pkgs;};

View File

@ -0,0 +1,9 @@
''
dontFixLibtool=1
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
xargsFlags=" "
export MACOSX_DEPLOYMENT_TARGET=10.9
export SDKROOT=$(/usr/bin/xcrun --sdk macosx10.9 --show-sdk-path 2> /dev/null || true)
export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$SDKROOT/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations"
export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib"
''

View File

@ -22,9 +22,7 @@ rec {
${prehookBase} ${prehookBase}
export NIX_DONT_SET_RPATH=1 export NIX_DONT_SET_RPATH=1
export NIX_NO_SELF_RPATH=1 export NIX_NO_SELF_RPATH=1
dontFixLibtool=1 ${import ../darwin/prehook.nix}
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
xargsFlags=" "
''; '';
prehookFreeBSD = '' prehookFreeBSD = ''