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










                                                

                       

              

                                         
 
                                                                         

                             

                                
  
{ stdenv, php, autoreconfHook, fetchurl }:

{ name
, buildInputs ? []
, 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 ];
  buildInputs = [ php ] ++ buildInputs;

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

  autoreconfPhase = "phpize";

  preConfigure = "touch unix.h";
})