summary refs log blame commit diff
path: root/pkgs/build-support/build-pecl.nix
blob: ce948739c320e30c55edef6b8453f9adb2e108a6 (plain) (tree)
1
2
3
4
5
                                          
 

                  
                        








                                                

                       

              
                                                              
                                       
 
                                                                         

                             

                                
  
{ stdenv, php, autoreconfHook, fetchurl }:

{ name
, buildInputs ? []
, nativeBuildInputs ? []
, makeFlags ? []
, src ? fetchurl {
    url = "http://pecl.php.net/get/${name}.tgz";
    inherit (args) sha256;
  }
, ...
}@args:

stdenv.mkDerivation (args // {
  name = "php-${name}";

  inherit src;

  nativeBuildInputs = [ autoreconfHook ] ++ nativeBuildInputs;
  buildInputs = [ php ] ++ buildInputs;

  makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags;

  autoreconfPhase = "phpize";

  preConfigure = "touch unix.h";
})