2012-12-28 15:36:09 +00:00
|
|
|
{ stdenv, pkgs, config }:
|
2004-03-11 17:26:14 +00:00
|
|
|
|
2012-01-19 18:25:35 +00:00
|
|
|
import ../generic rec {
|
2012-12-28 15:36:09 +00:00
|
|
|
inherit config;
|
|
|
|
|
2012-01-19 15:56:17 +00:00
|
|
|
preHook =
|
|
|
|
''
|
|
|
|
export NIX_ENFORCE_PURITY=1
|
|
|
|
export NIX_IGNORE_LD_THROUGH_GCC=1
|
2014-06-30 17:51:43 +00:00
|
|
|
'' + (if stdenv.isDarwin then ''
|
2014-07-02 17:52:25 +00: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-28 07:14:13 +00:00
|
|
|
export SDKROOT=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true)
|
2014-07-28 07:37:23 +00:00
|
|
|
export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$SDKROOT/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations"
|
2014-07-24 19:53:46 +00:00
|
|
|
export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib"
|
2014-06-30 17:51:43 +00:00
|
|
|
'' else "");
|
2012-01-19 15:56:17 +00:00
|
|
|
|
2006-07-14 08:35:59 +00:00
|
|
|
initialPath = (import ../common-path.nix) {pkgs = pkgs;};
|
2004-03-11 17:26:14 +00:00
|
|
|
|
2009-02-02 15:03:38 +00:00
|
|
|
system = stdenv.system;
|
2004-03-11 17:26:14 +00:00
|
|
|
|
2006-07-14 09:28:09 +00:00
|
|
|
gcc = import ../../build-support/gcc-wrapper {
|
2004-03-11 17:26:14 +00:00
|
|
|
nativeTools = false;
|
2013-02-23 13:59:59 +00:00
|
|
|
nativePrefix = stdenv.lib.optionalString stdenv.isSunOS "/usr";
|
2006-10-24 18:26:23 +00:00
|
|
|
nativeLibc = true;
|
2004-03-11 17:26:14 +00:00
|
|
|
inherit stdenv;
|
2012-12-28 15:41:56 +00:00
|
|
|
binutils =
|
2006-07-14 22:34:24 +00:00
|
|
|
if stdenv.isDarwin then
|
2006-07-14 13:34:39 +00:00
|
|
|
import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;}
|
2006-07-14 11:59:38 +00:00
|
|
|
else
|
|
|
|
pkgs.binutils;
|
2012-04-23 15:47:37 +00:00
|
|
|
gcc = pkgs.gcc.gcc;
|
2009-11-20 16:56:11 +00:00
|
|
|
coreutils = pkgs.coreutils;
|
2006-10-17 14:06:18 +00:00
|
|
|
shell = pkgs.bash + "/bin/sh";
|
2004-03-11 17:26:14 +00:00
|
|
|
};
|
|
|
|
|
2006-10-17 14:06:18 +00:00
|
|
|
shell = pkgs.bash + "/bin/sh";
|
2006-05-31 15:08:25 +00:00
|
|
|
|
2008-06-18 15:09:13 +00:00
|
|
|
fetchurlBoot = stdenv.fetchurlBoot;
|
2012-01-19 18:25:35 +00:00
|
|
|
|
|
|
|
overrides = pkgs_: {
|
|
|
|
inherit gcc;
|
|
|
|
inherit (gcc) binutils;
|
2012-12-28 15:41:56 +00:00
|
|
|
inherit (pkgs)
|
2012-01-19 18:25:35 +00:00
|
|
|
gzip bzip2 xz bash coreutils diffutils findutils gawk
|
|
|
|
gnumake gnused gnutar gnugrep gnupatch perl;
|
|
|
|
};
|
2003-11-03 10:22:00 +00:00
|
|
|
}
|