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

         
                  
                        

                  
                                                            





                              
                                   
 

              
                                                                   
                                       
 
                                                                         


                             
{ stdenv, php, autoreconfHook, fetchurl, re2c }:

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

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

  inherit src;

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

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

  autoreconfPhase = "phpize";
})