1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 08:01:14 +00:00
nixpkgs/pkgs/build-support/build-pecl.nix
2019-06-11 22:21:35 +03:00

27 lines
556 B
Nix

{ stdenv, php, autoreconfHook, fetchurl, re2c }:
{ pname
, version
, buildInputs ? []
, nativeBuildInputs ? []
, makeFlags ? []
, src ? fetchurl {
url = "http://pecl.php.net/get/${pname}-${version}.tgz";
inherit (args) sha256;
}
, ...
}@args:
stdenv.mkDerivation (args // {
name = "php-${pname}-${version}";
inherit src;
nativeBuildInputs = [ autoreconfHook re2c ] ++ nativeBuildInputs;
buildInputs = [ php ] ++ buildInputs;
makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags;
autoreconfPhase = "phpize";
})