1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-01 01:51:24 +00:00
nixpkgs/pkgs/build-support/build-pecl.nix
Piotr Bogdan eb33f5bc04 build-pecl: honour nativeBuildInputs
Otherwise certain extensions are unable to locate pkgconfig.
2017-11-02 16:28:06 +00:00

28 lines
544 B
Nix

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