diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-07-14 11:59:38 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-07-14 11:59:38 +0000 |
commit | dd325103dfd192d36c707bc7269e50b1e3339e09 (patch) | |
tree | 6066c9b7951938335f86cf238c5d6fd0ac369882 /pkgs/stdenv/nix | |
parent | 2881391565d0de4929fe0c31c73b22defe47d297 (diff) |
* Better stdenv for Darwin: uses gcc, coreutils etc. built in Nix, but
external binutils (i.e., Apple's cctools in /usr/bin). svn path=/nixpkgs/trunk/; revision=5706
Diffstat (limited to 'pkgs/stdenv/nix')
-rw-r--r-- | pkgs/stdenv/nix/default.nix | 10 | ||||
-rw-r--r-- | pkgs/stdenv/nix/prehook.sh | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix index 34109e2dbc79c..f8488615cee21 100644 --- a/pkgs/stdenv/nix/default.nix +++ b/pkgs/stdenv/nix/default.nix @@ -1,6 +1,6 @@ -{stdenv, pkgs, genericStdenv}: +{stdenv, pkgs}: -genericStdenv { +import ../generic { name = "stdenv-nix"; preHook = ./prehook.sh; initialPath = (import ../common-path.nix) {pkgs = pkgs;}; @@ -11,7 +11,11 @@ genericStdenv { nativeTools = false; nativeGlibc = true; inherit stdenv; - inherit (pkgs) binutils; + binutils = + if stdenv.system == "i686-darwin" || stdenv.system == "powerpc-darwin" then + import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;}; + else + pkgs.binutils; gcc = pkgs.gcc.gcc; shell = pkgs.bash ~ /bin/sh; }; diff --git a/pkgs/stdenv/nix/prehook.sh b/pkgs/stdenv/nix/prehook.sh index 734d0f1ae83ae..35adc3745dcd1 100644 --- a/pkgs/stdenv/nix/prehook.sh +++ b/pkgs/stdenv/nix/prehook.sh @@ -1,2 +1,9 @@ export NIX_ENFORCE_PURITY=1 export NIX_IGNORE_LD_THROUGH_GCC=1 + +if test "$system" = "i686-darwin" -o "$system" = "powerpc-darwin"; then + export NIX_DONT_SET_RPATH=1 + export NIX_NO_SELF_RPATH=1 + dontFixLibtool=1 + NIX_STRIP_DEBUG=0 # !!! do we still need this? +fi |