about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/tools/compression/bzip2/default.nix2
-rw-r--r--pkgs/top-level/all-packages.nix9
2 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix
index 3869bdb06dce..c54b619fc4c6 100644
--- a/pkgs/tools/compression/bzip2/default.nix
+++ b/pkgs/tools/compression/bzip2/default.nix
@@ -3,7 +3,7 @@
 stdenv.mkDerivation {
   name = "bzip2-1.0.3";
   builder =
-    if stdenv.system == "powerpc-darwin" then ./builder-darwin.sh
+    if stdenv.system == "powerpc-darwin" || stdenv.system == "i686-darwin" then ./builder-darwin.sh
     else if stdenv.system == "i686-freebsd" then ./builder-freebsd.sh
     else if stdenv.system == "i686-cygwin" then ./builder-cygwin.sh
     else ./builder.sh;
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ec1d4dec8403..c3d45ab8ede2 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -58,6 +58,9 @@ rec {
       );
     };
 
+  # Check if stdenv.system denotes Mac OS X.
+  isDarwin = stdenv: stdenv.system == "powerpc-darwin" || stdenv.system == "i686-darwin";
+
 
   ### STANDARD ENVIRONMENT
 
@@ -157,7 +160,7 @@ rec {
   };
 
   patch = useFromStdenv (stdenv ? patch) stdenv.patch
-    (if stdenv.system == "powerpc-darwin" then null else gnupatch);
+    (if isDarwin stdenv then null else gnupatch);
 
   gnused = useFromStdenv (stdenv ? gnused) stdenv.gnused
     (import ../tools/text/gnused {
@@ -759,7 +762,7 @@ rec {
   };
 
   jdk = 
-    if stdenv.system == "powerpc-darwin" then 
+    if isDarwin stdenv then 
       "/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home"
     else
       (import ../development/compilers/jdk) {
@@ -959,7 +962,7 @@ rec {
   php = (import ../development/interpreters/php) {
     inherit stdenv fetchurl flex bison libxml2 apacheHttpd;
     unixODBC =
-      if stdenv.system == "powerpc-darwin" then null else unixODBC;
+      if isDarwin stdenv then null else unixODBC;
   };
 
   guile = (import ../development/interpreters/guile) {