From ac8775dd968f49a37260c53690d072faf91aca6f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 24 Jul 2014 21:53:46 +0200 Subject: $xcodePath -> $SDKROOT SDKROOT is standard. In particular, this fixes the cmake build on Mac OS X 10.9. --- pkgs/development/compilers/gcc/4.8/default.nix | 10 +++++----- pkgs/development/libraries/libsamplerate/default.nix | 2 +- pkgs/development/libraries/libsndfile/default.nix | 2 +- pkgs/stdenv/nix/default.nix | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'pkgs') diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 6357e8f6a0c2..0664cc0ebd51 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -309,12 +309,12 @@ stdenv.mkDerivation ({ export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" '' + stdenv.lib.optionalString stdenv.isDarwin '' - if xcodePath=$(/usr/bin/xcrun --show-sdk-path); then - configureFlagsArray+=(--with-native-system-header-dir=$xcodePath/usr/include) + if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then + configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) makeFlagsArray+=( \ - CFLAGS_FOR_BUILD=-F$xcodePath/System/Library/Frameworks \ - CFLAGS_FOR_TARGET=-F$xcodePath/System/Library/Frameworks \ - FLAGS_FOR_TARGET=-F$xcodePath/System/Library/Frameworks \ + CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ + CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ + FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ ) fi ''; diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix index 183caefff852..85d51d0ad71e 100644 --- a/pkgs/development/libraries/libsamplerate/default.nix +++ b/pkgs/development/libraries/libsamplerate/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { '' # need headers from the Carbon.framework in /System/Library/Frameworks to # compile this on darwin -- not sure how to handle - NIX_CFLAGS_COMPILE+=" -I$xcodePath/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" + NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" substituteInPlace examples/Makefile --replace "-fpascal-strings" "" ''; diff --git a/pkgs/development/libraries/libsndfile/default.nix b/pkgs/development/libraries/libsndfile/default.nix index f97bd040a544..74140d5f335e 100644 --- a/pkgs/development/libraries/libsndfile/default.nix +++ b/pkgs/development/libraries/libsndfile/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { # compile this on darwin -- not sure how to handle preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' - NIX_CFLAGS_COMPILE+=" -I$xcodePath/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" + NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" ''; # Needed on Darwin. diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix index b540456afa4a..2301b8b8f2b1 100644 --- a/pkgs/stdenv/nix/default.nix +++ b/pkgs/stdenv/nix/default.nix @@ -15,9 +15,9 @@ import ../generic rec { stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" xargsFlags=" " export MACOSX_DEPLOYMENT_TARGET=10.6 - xcodePath=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true) - export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $xcodePath/usr/include -F$xcodePath/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations" - export NIX_LDFLAGS_AFTER+=" -L$xcodePath/usr/lib" + SDKROOT=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true) + export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$xcodePath/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations" + export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib" '' else ""); initialPath = (import ../common-path.nix) {pkgs = pkgs;}; -- cgit 1.4.1