2012-12-28 10:36:09 -05:00
|
|
|
{ stdenv, pkgs, config }:
|
2004-03-11 12:26:14 -05:00
|
|
|
|
2012-01-19 13:25:35 -05:00
|
|
|
import ../generic rec {
|
2012-12-28 10:36:09 -05:00
|
|
|
inherit config;
|
|
|
|
|
2012-01-19 10:56:17 -05:00
|
|
|
preHook =
|
|
|
|
''
|
|
|
|
export NIX_ENFORCE_PURITY=1
|
|
|
|
export NIX_IGNORE_LD_THROUGH_GCC=1
|
2014-06-30 13:51:43 -04:00
|
|
|
'' + (if stdenv.isDarwin then ''
|
2014-07-02 13:52:25 -04:00
|
|
|
export NIX_ENFORCE_PURITY=
|
|
|
|
export NIX_DONT_SET_RPATH=1
|
|
|
|
export NIX_NO_SELF_RPATH=1
|
|
|
|
dontFixLibtool=1
|
|
|
|
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
|
|
|
|
xargsFlags=" "
|
|
|
|
export MACOSX_DEPLOYMENT_TARGET=10.6
|
2014-07-24 15:53:46 -04:00
|
|
|
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"
|
2014-06-30 13:51:43 -04:00
|
|
|
'' else "");
|
2012-01-19 10:56:17 -05:00
|
|
|
|
2006-07-14 04:35:59 -04:00
|
|
|
initialPath = (import ../common-path.nix) {pkgs = pkgs;};
|
2004-03-11 12:26:14 -05:00
|
|
|
|
2009-02-02 10:03:38 -05:00
|
|
|
system = stdenv.system;
|
2004-03-11 12:26:14 -05:00
|
|
|
|
2006-07-14 05:28:09 -04:00
|
|
|
gcc = import ../../build-support/gcc-wrapper {
|
2004-03-11 12:26:14 -05:00
|
|
|
nativeTools = false;
|
2013-02-23 08:59:59 -05:00
|
|
|
nativePrefix = stdenv.lib.optionalString stdenv.isSunOS "/usr";
|
2006-10-24 14:26:23 -04:00
|
|
|
nativeLibc = true;
|
2004-03-11 12:26:14 -05:00
|
|
|
inherit stdenv;
|
2012-12-28 10:41:56 -05:00
|
|
|
binutils =
|
2006-07-14 18:34:24 -04:00
|
|
|
if stdenv.isDarwin then
|
2006-07-14 09:34:39 -04:00
|
|
|
import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;}
|
2006-07-14 07:59:38 -04:00
|
|
|
else
|
|
|
|
pkgs.binutils;
|
2012-04-23 11:47:37 -04:00
|
|
|
gcc = pkgs.gcc.gcc;
|
2009-11-20 11:56:11 -05:00
|
|
|
coreutils = pkgs.coreutils;
|
2006-10-17 10:06:18 -04:00
|
|
|
shell = pkgs.bash + "/bin/sh";
|
2004-03-11 12:26:14 -05:00
|
|
|
};
|
|
|
|
|
2006-10-17 10:06:18 -04:00
|
|
|
shell = pkgs.bash + "/bin/sh";
|
2006-05-31 11:08:25 -04:00
|
|
|
|
2008-06-18 11:09:13 -04:00
|
|
|
fetchurlBoot = stdenv.fetchurlBoot;
|
2012-01-19 13:25:35 -05:00
|
|
|
|
|
|
|
overrides = pkgs_: {
|
|
|
|
inherit gcc;
|
|
|
|
inherit (gcc) binutils;
|
2012-12-28 10:41:56 -05:00
|
|
|
inherit (pkgs)
|
2012-01-19 13:25:35 -05:00
|
|
|
gzip bzip2 xz bash coreutils diffutils findutils gawk
|
|
|
|
gnumake gnused gnutar gnugrep gnupatch perl;
|
|
|
|
};
|
2003-11-03 05:22:00 -05:00
|
|
|
}
|