aboutsummaryrefslogtreecommitdiff
path: root/pkgs/build-support/build-pecl.nix
diff options
context:
space:
mode:
authortalyz <kim.lindberger@gmail.com>2020-03-28 23:20:38 +0100
committertalyz <kim.lindberger@gmail.com>2020-04-05 16:44:13 +0200
commit9ac0d9ad61a2e5cce6fc8ae6c282df3ec9e77f98 (patch)
tree5c470d96dae7fbffc91018c67ed77437c3cdd9fc /pkgs/build-support/build-pecl.nix
parent90dcab948c22f997a76f9f77afe5f542af2e6734 (diff)
php.packages.buildPecl: Introduce built-in extension dependencies
Introduce the internalDeps attribute used by mkExtension, to refer to internal php extensions built by mkExtension.
Diffstat (limited to 'pkgs/build-support/build-pecl.nix')
-rw-r--r--pkgs/build-support/build-pecl.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/build-support/build-pecl.nix b/pkgs/build-support/build-pecl.nix
index a1030e3b34fa..f43205f24c5c 100644
--- a/pkgs/build-support/build-pecl.nix
+++ b/pkgs/build-support/build-pecl.nix
@@ -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}
+ '';
})