From 0b6e4828ccc119573ac685b26f9847de10022915 Mon Sep 17 00:00:00 2001
From: Marc Weber <marco-oweber@gmx.de>
Date: Tue, 1 Apr 2008 18:16:01 +0000
Subject: [PATCH] added php curl support

svn path=/nixpkgs/trunk/; revision=11446
---
 .../interpreters/php_configurable/default.nix | 25 ++++++++++---------
 pkgs/top-level/all-packages.nix               |  4 +--
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/pkgs/development/interpreters/php_configurable/default.nix b/pkgs/development/interpreters/php_configurable/default.nix
index d18a2cf2b056..dc42c723a362 100644
--- a/pkgs/development/interpreters/php_configurable/default.nix
+++ b/pkgs/development/interpreters/php_configurable/default.nix
@@ -411,6 +411,7 @@ args:
 
 # Extensions 
 
+          curl          =     { cfgOption = [ "--with-curl=${args.curl}" "--with-curlwrappers"]; pass = "curl";};
           zlib          =     { cfgOption = "--with-zlib=${args.zlib}"; pass = "zlib"; };
 
           libxml2       =     { cfgOption = "--with-libxml-dir=\$libxml2";
@@ -491,18 +492,18 @@ args:
         ./configure --prefix=$out
         make
         ensureDir $out/lib; cp modules/xdebug.so $out/lib
-        cat >> $iniFile << EOF
-          zend_extension="$out/lib/xdebug.so"
-          zend_extension_ts="$out/lib/xdebug.so"
-          zend_extension_debug="$out/lib/xdebug.so"
-          xdebug.remote_enable=true
-          xdebug.remote_host=127.0.0.1
-          xdebug.remote_port=9000
-          xdebug.remote_handler=dbgp
-          xdebug.profiler_enable=0
-          xdebug.profiler_output_dir="/tmp/xdebug"
-          xdebug.remote_mode=req
-        EOF
+cat >> $iniFile << EOF
+  zend_extension="$out/lib/xdebug.so"
+  zend_extension_ts="$out/lib/xdebug.so"
+  zend_extension_debug="$out/lib/xdebug.so"
+  xdebug.remote_enable=true
+  xdebug.remote_host=127.0.0.1
+  xdebug.remote_port=9000
+  xdebug.remote_handler=dbgp
+  xdebug.profiler_enable=0
+  xdebug.profiler_output_dir="/tmp/xdebug"
+  xdebug.remote_mode=req
+EOF
       fi
     '';
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 709b69bfeaeb..f5098f192cf3 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1722,13 +1722,13 @@ let pkgs = rec {
     # optional features
     inherit fetchurl flex bison apacheHttpd mysql libxml2; # gettext;
     inherit zlib;
-    flags = [ "xdebug" "mysql" "mysqli" "pdo_mysql" "libxml2" "apxs2" ];
+   flags = [ "xdebug" "mysql" "mysqli" "pdo_mysql" "libxml2" "apxs2" "curl" ];
   };
 
   python = python24;
 
   python24 = import ../development/interpreters/python/2.4 {
-    inherit fetchurl stdenv zlib bzip2;
+  inherit fetchurl stdenv zlib bzip2;
   };
 
   python25 = import ../development/interpreters/python/2.5 {