1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/pkgs/stdenv/nix/default.nix

54 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv, pkgs, config, lib }:
import ../generic rec {
inherit config;
preHook =
''
export NIX_ENFORCE_PURITY=1
export NIX_IGNORE_LD_THROUGH_GCC=1
'' + lib.optionalString stdenv.isDarwin ''
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 08:14:13 +01:00
export SDKROOT=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true)
2014-07-28 08:37:23 +01: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;
gcc = import ../../build-support/gcc-wrapper {
nativeTools = false;
nativePrefix = stdenv.lib.optionalString stdenv.isSunOS "/usr";
nativeLibc = true;
inherit stdenv;
2012-12-28 15:41:56 +00:00
binutils =
if stdenv.isDarwin then
import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;}
else
pkgs.binutils;
gcc = pkgs.gcc.gcc;
coreutils = pkgs.coreutils;
shell = pkgs.bash + "/bin/sh";
};
shell = pkgs.bash + "/bin/sh";
fetchurlBoot = stdenv.fetchurlBoot;
overrides = pkgs_: {
inherit gcc;
inherit (gcc) binutils;
2012-12-28 15:41:56 +00:00
inherit (pkgs)
gzip bzip2 xz bash coreutils diffutils findutils gawk
gnumake gnused gnutar gnugrep gnupatch perl;
};
}