From 1b47486557904fef3b186ecaf14698d904861fd8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 18 May 2004 10:59:18 +0000 Subject: [PATCH] * Darwin (Mac OS X) standard environment. svn path=/nixpkgs/trunk/; revision=1031 --- pkgs/stdenv/darwin/default.nix | 19 +++++++++++++++++++ pkgs/stdenv/darwin/prehook.sh | 3 +++ pkgs/system/all-packages.nix | 6 +++--- pkgs/system/powerpc-darwin.nix | 3 +++ pkgs/system/stdenvs.nix | 14 ++++++++++++++ 5 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 pkgs/stdenv/darwin/default.nix create mode 100644 pkgs/stdenv/darwin/prehook.sh create mode 100644 pkgs/system/powerpc-darwin.nix diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix new file mode 100644 index 00000000000..b07a694276e --- /dev/null +++ b/pkgs/stdenv/darwin/default.nix @@ -0,0 +1,19 @@ +{stdenv, genericStdenv, gccWrapper}: + +genericStdenv { + name = "stdenv-darwin"; + preHook = ./prehook.sh; + initialPath = "/usr/local /usr /"; + + inherit stdenv; + + gcc = gccWrapper { + name = "gcc-darwin"; + nativeTools = true; + nativeGlibc = true; + nativePrefix = "/usr"; + inherit stdenv; + }; + + shell = "/bin/sh"; +} diff --git a/pkgs/stdenv/darwin/prehook.sh b/pkgs/stdenv/darwin/prehook.sh new file mode 100644 index 00000000000..505930e0487 --- /dev/null +++ b/pkgs/stdenv/darwin/prehook.sh @@ -0,0 +1,3 @@ +export NIX_ENFORCE_PURITY= +export NIX_DONT_SET_RPATH=1 +export NIX_NO_SELF_RPATH=1 diff --git a/pkgs/system/all-packages.nix b/pkgs/system/all-packages.nix index 571986ec997..1de35dcaa4b 100644 --- a/pkgs/system/all-packages.nix +++ b/pkgs/system/all-packages.nix @@ -11,7 +11,7 @@ # Select the right instantiation. body = - if system == "i686-linux" - then stdenvs.stdenvLinuxPkgs - else (stdenvs.stdenvNixPkgs); + if system == "i686-linux" then stdenvs.stdenvLinuxPkgs + else if system == "powerpc-darwin7.3.0" then stdenvs.stdenvDarwinPkgs + else stdenvs.stdenvNativePkgs; } diff --git a/pkgs/system/powerpc-darwin.nix b/pkgs/system/powerpc-darwin.nix new file mode 100644 index 00000000000..6d0daa2fe41 --- /dev/null +++ b/pkgs/system/powerpc-darwin.nix @@ -0,0 +1,3 @@ +{ inherit ((import ./all-packages.nix) {system = "powerpc-darwin7.3.0";}) + aterm strategoxt subversion; +} diff --git a/pkgs/system/stdenvs.nix b/pkgs/system/stdenvs.nix index 7e41c0b6e86..dfbca8a2468 100644 --- a/pkgs/system/stdenvs.nix +++ b/pkgs/system/stdenvs.nix @@ -133,4 +133,18 @@ # On the other hand, a validating build of glibc is a good idea (it # probably won't work right now due to --rpath madness). + + # Darwin (Mac OS X) standard environment. Very simple for now + # (essentially it's just the native environment). + stdenvDarwin = (import ../stdenv/darwin) { + stdenv = stdenvInitial; + inherit genericStdenv gccWrapper; + }; + + stdenvDarwinPkgs = allPackages { + stdenv = stdenvDarwin; + bootCurl = null; + noSysDirs = false; + }; + }