diff options
author | Shea Levy <shea@shealevy.com> | 2014-07-03 10:52:02 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2014-07-03 11:01:19 -0400 |
commit | 90bfde59f8235fb85f8852c496afb6414ead0239 (patch) | |
tree | 4d7f2804c81233065fb31a79509628eeaf2212fb /pkgs/build-support/build-pecl.nix | |
parent | 20a931aa8b5f9a501168148af734955105969584 (diff) |
Simplify php-packages.nix
Diffstat (limited to 'pkgs/build-support/build-pecl.nix')
-rw-r--r-- | pkgs/build-support/build-pecl.nix | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/build-support/build-pecl.nix b/pkgs/build-support/build-pecl.nix index 727ed0c21975b..135b68186f3aa 100644 --- a/pkgs/build-support/build-pecl.nix +++ b/pkgs/build-support/build-pecl.nix @@ -1,11 +1,23 @@ -{ stdenv, php, autoreconfHook }: +{ stdenv, php, autoreconfHook, fetchurl }: -args@{ name, ... }: stdenv.mkDerivation (args // { +{ name +, buildInputs ? [] +, makeFlags ? [] +, src ? fetchurl { + url = "http://pecl.php.net/get/${name}.tgz"; + inherit (args) sha256; + } +, ... +}@args: + +stdenv.mkDerivation (args // { name = "php-${name}"; - buildInputs = [ php autoreconfHook ] ++ args.buildInputs or []; + inherit src; + + buildInputs = [ php autoreconfHook ] ++ buildInputs; - makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ args.makeFlags or []; + makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags; autoreconfPhase = "phpize"; }) |