nixpkgs/pkgs/build-support/build-pecl.nix

27 lines
498 B
Nix
Raw Normal View History

2014-07-03 16:52:02 +02:00
{ stdenv, php, autoreconfHook, fetchurl }:
2014-03-24 13:37:36 +01:00
2014-07-03 16:52:02 +02:00
{ name
, buildInputs ? []
, makeFlags ? []
, src ? fetchurl {
url = "http://pecl.php.net/get/${name}.tgz";
inherit (args) sha256;
}
, ...
}@args:
stdenv.mkDerivation (args // {
2014-07-03 16:19:57 +02:00
name = "php-${name}";
2014-07-03 16:52:02 +02:00
inherit src;
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ php ] ++ buildInputs;
2014-03-24 13:37:36 +01:00
2014-07-03 16:52:02 +02:00
makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags;
2014-03-24 13:37:36 +01:00
autoreconfPhase = "phpize";
preConfigure = "touch unix.h";
2014-03-24 13:37:36 +01:00
})