about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/interpreters/php-xdebug/default.nix3
-rw-r--r--pkgs/development/interpreters/php/5.3.nix10
-rw-r--r--pkgs/tools/networking/uwimap/default.nix10
3 files changed, 19 insertions, 4 deletions
diff --git a/pkgs/development/interpreters/php-xdebug/default.nix b/pkgs/development/interpreters/php-xdebug/default.nix
index fe7bbb869da8..99c5ad663af4 100644
--- a/pkgs/development/interpreters/php-xdebug/default.nix
+++ b/pkgs/development/interpreters/php-xdebug/default.nix
@@ -14,6 +14,9 @@ stdenv.mkDerivation rec {
   configurePhase = ''
     phpize
     ./configure --prefix=$out
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    # looks for this file for some reason -- isn't needed
+    touch unix.h
   '';
 
   buildPhase = ''
diff --git a/pkgs/development/interpreters/php/5.3.nix b/pkgs/development/interpreters/php/5.3.nix
index a84927a20f3d..caa673b31a92 100644
--- a/pkgs/development/interpreters/php/5.3.nix
+++ b/pkgs/development/interpreters/php/5.3.nix
@@ -134,8 +134,11 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
       };
 
       imap = {
-        configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" ];
-        buildInputs = [ uwimap openssl pam ];
+        configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" ]
+          # uwimap builds with kerberos on darwin
+          ++ stdenv.lib.optional (stdenv.isDarwin) "--with-kerberos";
+        buildInputs = [ uwimap openssl ]
+          ++ stdenv.lib.optional (!stdenv.isDarwin) pam;
       };
 
       intl = {
@@ -205,6 +208,9 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
     [[ -z "$libxml2" ]] || export PATH=$PATH:$libxml2/bin
     ./configure --with-config-file-scan-dir=/etc --with-config-file-path=$out/etc --prefix=$out $configureFlags
     echo configurePhase end
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    # don't build php.dSYM as the php binary
+    sed -i 's/EXEEXT = \.dSYM/EXEEXT =/' Makefile
   '';
 
   installPhase = ''
diff --git a/pkgs/tools/networking/uwimap/default.nix b/pkgs/tools/networking/uwimap/default.nix
index 5ffeb53dd29e..54390d4f9eee 100644
--- a/pkgs/tools/networking/uwimap/default.nix
+++ b/pkgs/tools/networking/uwimap/default.nix
@@ -8,17 +8,23 @@ stdenv.mkDerivation {
     sha256 = "0a2a00hbakh0640r2wdpnwr8789z59wnk7rfsihh3j0vbhmmmqak";
   };
 
-  makeFlags = "lnp" # Linux with PAM modules
+  makeFlags = if stdenv.isDarwin
+    then "osx"
+    else "lnp" # Linux with PAM modules;
     # -fPIC is required to compile php with imap on x86_64 systems
     + stdenv.lib.optionalString stdenv.isx86_64 " EXTRACFLAGS=-fPIC";
 
-  buildInputs = [ pam openssl ];
+  buildInputs = [ openssl ]
+    ++ stdenv.lib.optional (!stdenv.isDarwin) pam;
 
   patchPhase = ''
     sed -i -e s,/usr/local/ssl,${openssl}, \
       src/osdep/unix/Makefile
   '';
 
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin
+    "-I${openssl}/include/openssl";
+
   installPhase = ''
     mkdir -p $out/bin $out/lib $out/include
     cp c-client/*.h c-client/linkage.c $out/include