1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-03 19:15:39 +00:00

php.packages.buildPecl: Introduce built-in extension dependencies

Introduce the internalDeps attribute used by mkExtension, to refer to
internal php extensions built by mkExtension.
This commit is contained in:
talyz 2020-03-28 23:20:38 +01:00
parent 90dcab948c
commit 9ac0d9ad61
No known key found for this signature in database
GPG key ID: 2DED2151F4671A2B

View file

@ -1,9 +1,11 @@
{ stdenv, php, autoreconfHook, fetchurl, re2c }:
{ stdenv, lib, php, autoreconfHook, fetchurl, re2c }:
{ pname
, version
, internalDeps ? []
, buildInputs ? []
, nativeBuildInputs ? []
, postPhpize ? ""
, makeFlags ? []
, src ? fetchurl {
url = "http://pecl.php.net/get/${pname}-${version}.tgz";
@ -22,5 +24,11 @@ stdenv.mkDerivation (args // {
makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags;
autoreconfPhase = "phpize";
autoreconfPhase = ''
phpize
${postPhpize}
${lib.concatMapStringsSep "\n"
(dep: "mkdir -p ext; ln -s ${dep.dev}/include ext/${dep.extensionName}")
internalDeps}
'';
})