diff options
Diffstat (limited to 'pkgs/build-support/build-pecl.nix')
-rw-r--r-- | pkgs/build-support/build-pecl.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pkgs/build-support/build-pecl.nix b/pkgs/build-support/build-pecl.nix new file mode 100644 index 000000000000..135b68186f3a --- /dev/null +++ b/pkgs/build-support/build-pecl.nix @@ -0,0 +1,23 @@ +{ 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; + + buildInputs = [ php autoreconfHook ] ++ buildInputs; + + makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags; + + autoreconfPhase = "phpize"; +}) |