2014-08-24 03:26:55 +02:00
|
|
|
{ stdenv, pkgs, config
|
|
|
|
, haveLibCxx ? true
|
2014-10-15 01:15:31 +02:00
|
|
|
, useClang33 ? true }:
|
2014-08-17 22:17:13 +02:00
|
|
|
|
|
|
|
import ../generic rec {
|
|
|
|
inherit config;
|
|
|
|
|
|
|
|
preHook =
|
|
|
|
''
|
|
|
|
export NIX_ENFORCE_PURITY=
|
|
|
|
export NIX_IGNORE_LD_THROUGH_GCC=1
|
|
|
|
export NIX_DONT_SET_RPATH=1
|
|
|
|
export NIX_NO_SELF_RPATH=1
|
|
|
|
dontFixLibtool=1
|
|
|
|
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
|
|
|
|
xargsFlags=" "
|
2014-11-04 13:27:42 +01:00
|
|
|
export MACOSX_DEPLOYMENT_TARGET=10.9
|
|
|
|
export SDKROOT=$(/usr/bin/xcrun --sdk macosx10.9 --show-sdk-path 2> /dev/null || true)
|
2014-08-17 22:17:13 +02:00
|
|
|
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;};
|
|
|
|
|
|
|
|
system = stdenv.system;
|
|
|
|
|
2014-10-10 15:48:34 +02:00
|
|
|
gcc = import ../../build-support/gcc-wrapper {
|
2014-08-17 22:17:13 +02:00
|
|
|
nativeTools = false;
|
|
|
|
nativeLibc = true;
|
|
|
|
inherit stdenv;
|
2014-09-29 19:58:09 +02:00
|
|
|
extraPackages = stdenv.lib.optional haveLibCxx pkgs.libcxx;
|
2014-08-17 22:17:13 +02:00
|
|
|
binutils = import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;};
|
2014-10-10 15:48:34 +02:00
|
|
|
gcc = if useClang33 then pkgs.clang_33.gcc else pkgs.clang.gcc;
|
2014-08-17 22:17:13 +02:00
|
|
|
coreutils = pkgs.coreutils;
|
|
|
|
shell = pkgs.bash + "/bin/sh";
|
|
|
|
};
|
|
|
|
|
|
|
|
shell = pkgs.bash + "/bin/sh";
|
|
|
|
|
|
|
|
fetchurlBoot = stdenv.fetchurlBoot;
|
|
|
|
|
|
|
|
overrides = pkgs_: {
|
|
|
|
inherit gcc;
|
|
|
|
inherit (gcc) binutils;
|
|
|
|
inherit (pkgs)
|
|
|
|
gzip bzip2 xz bash coreutils diffutils findutils gawk
|
2014-10-14 16:36:44 +02:00
|
|
|
gnumake gnused gnutar gnugrep gnupatch perl libcxx libcxxabi;
|
2014-08-17 22:17:13 +02:00
|
|
|
};
|
|
|
|
}
|