about summary refs log tree commit diff
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2012-01-15 22:52:29 +0000
committerShea Levy <shea@shealevy.com>2012-01-15 22:52:29 +0000
commitb28b8c79ddf5cdf7bcb8ff4025b39a1ba455e409 (patch)
treee6bb37110bd5a396e7d2a51d8c593b7b51cbae6b
parentb7c53fcc4cb4210a6e718e2a5a0c7edc3a0e952b (diff)
Make a sepseparate directory for darwin's stdenv backups/darwin-without-xcode@34172
svn path=/nixpkgs/branches/darwin-without-xcode/; revision=31575
-rw-r--r--pkgs/stdenv/darwin/default.nix23
-rw-r--r--pkgs/stdenv/darwin/prehook.sh9
-rw-r--r--pkgs/stdenv/default.nix9
-rw-r--r--pkgs/stdenv/nix/default.nix8
-rw-r--r--pkgs/stdenv/nix/prehook.sh9
5 files changed, 41 insertions, 17 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix
new file mode 100644
index 0000000000000..a1b42394a8861
--- /dev/null
+++ b/pkgs/stdenv/darwin/default.nix
@@ -0,0 +1,23 @@
+{stdenv, pkgs}:
+
+import ../generic {
+  name = "stdenv-darwin";
+  preHook = ./prehook.sh;
+  initialPath = (import ../common-path.nix) {pkgs = pkgs;};
+
+  system = stdenv.system;
+
+  gcc = import ../../build-support/gcc-wrapper {
+    nativeTools = false;
+    nativeLibc = true;
+    inherit stdenv;
+    binutils = import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;};
+    gcc = pkgs.gccApple.gcc;
+    coreutils = pkgs.coreutils;
+    shell = pkgs.bash + "/bin/sh";
+  };
+
+  shell = pkgs.bash + "/bin/sh";
+
+  fetchurlBoot = stdenv.fetchurlBoot;
+}
diff --git a/pkgs/stdenv/darwin/prehook.sh b/pkgs/stdenv/darwin/prehook.sh
new file mode 100644
index 0000000000000..b3661d352113c
--- /dev/null
+++ b/pkgs/stdenv/darwin/prehook.sh
@@ -0,0 +1,9 @@
+export NIX_ENFORCE_PURITY=1
+export NIX_IGNORE_LD_THROUGH_GCC=1
+
+export NIX_DONT_SET_RPATH=1
+export NIX_NO_SELF_RPATH=1
+dontFixLibtool=1
+NIX_STRIP_DEBUG=0 # !!! do we still need this?
+stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" 
+xargsFlags=" "
diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix
index 11af6d371cdcb..1254936021789 100644
--- a/pkgs/stdenv/default.nix
+++ b/pkgs/stdenv/default.nix
@@ -39,6 +39,11 @@ rec {
     pkgs = stdenvNativePkgs;
   };
 
+  # Darwin standard environment.
+  stdenvDarwin = import ./darwin {
+    stdenv = stdenvNative;
+    pkgs = stdenvNativePkgs;
+  };
 
   # Linux standard environment.
   stdenvLinux = (import ./linux {inherit system allPackages platform;}).stdenvLinux;
@@ -58,7 +63,7 @@ rec {
     if stdenvType == "mips64-linux" then stdenvLinux else
     if stdenvType == "powerpc-linux" then /* stdenvLinux */ stdenvNative else
     if stdenvType == "i686-mingw" then stdenvMinGW else
-    if stdenvType == "i686-darwin" then stdenvNix else
-    if stdenvType == "x86_64-darwin" then stdenvNix else
+    if stdenvType == "i686-darwin" then stdenvDarwin else
+    if stdenvType == "x86_64-darwin" then stdenvDarwin else
     stdenvNative;
 }
diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix
index 5b1b2af8285fa..a9e810fa76925 100644
--- a/pkgs/stdenv/nix/default.nix
+++ b/pkgs/stdenv/nix/default.nix
@@ -11,12 +11,8 @@ import ../generic {
     nativeTools = false;
     nativeLibc = true;
     inherit stdenv;
-    binutils = 
-      if stdenv.isDarwin then
-        import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;}
-      else
-        pkgs.binutils;
-    gcc = if stdenv.isDarwin then pkgs.gccApple.gcc else pkgs.gcc.gcc;
+    binutils = pkgs.binutils;
+    gcc = pkgs.gcc.gcc;
     coreutils = pkgs.coreutils;
     shell = pkgs.bash + "/bin/sh";
   };
diff --git a/pkgs/stdenv/nix/prehook.sh b/pkgs/stdenv/nix/prehook.sh
index 55389b7d77168..734d0f1ae83ae 100644
--- a/pkgs/stdenv/nix/prehook.sh
+++ b/pkgs/stdenv/nix/prehook.sh
@@ -1,11 +1,2 @@
 export NIX_ENFORCE_PURITY=1
 export NIX_IGNORE_LD_THROUGH_GCC=1
-
-if test "$system" = "i686-darwin" -o "$system" = "powerpc-darwin" -o "$system" = "x86_64-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?
-    stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" 
-    xargsFlags=" "
-fi