Commit graph

424 commits

Author SHA1 Message Date
Soner Sayakci 4cd8412880
php80: init at 8.0.0 2020-12-01 11:54:42 +01:00
ajs124 1eb55d4c55 php74: 7.4.12 -> 7.4.13
https://www.php.net/ChangeLog-7.php#7.4.13
2020-11-26 20:14:48 +01:00
ajs124 eec6063cc4 php73: 7.3.24 -> 7.3.25
https://www.php.net/ChangeLog-7.php#7.3.25
2020-11-26 15:31:25 +01:00
Alex Good aaa7af13dc Merge branch 'master' into wrapprogram-for-phpdbg 2020-11-16 16:38:21 +00:00
Alex Good 68761cb016 wrapProgram for phpdbg in pkgs.php* 2020-11-16 16:27:38 +00:00
Elis Hirwing b62b76b78b
php: Refactor to have the different versions as separate files
This should enable easier auto updates of the packages.
2020-11-06 13:48:27 +01:00
Elis Hirwing caa71a3ee4
Merge pull request #102715 from etu/php74-update
php74: 7.4.11 -> 7.4.12
2020-11-05 13:01:01 +01:00
Elis Hirwing c1a2cf890a
php74: 7.4.11 -> 7.4.12 2020-11-04 07:05:49 +01:00
Elis Hirwing fc48e6f932
php73: 7.3.23 -> 7.3.24 2020-11-04 07:05:21 +01:00
Nikolay Korotkiy e300f0fd69
php: fix on darwin 2020-10-27 13:24:20 +03:00
Elis Hirwing 5a12d2797c
php: Fix pear path 2020-10-14 07:41:30 +02:00
Jan Tojnar a07508c1d3
php: declare ZTS support
Binary extensions like Blackfire need to know whether PHP was
compiled with ZTS support to work properly.
2020-10-07 10:44:53 +02:00
Maximilian Bosch 385eeb4c35
Merge pull request #99377 from etu/php73-update
php73: 7.3.20 -> 7.3.23
2020-10-03 17:44:13 +02:00
Elis Hirwing e04af50179
php73: 7.3.20 -> 7.3.23
- https://www.php.net/ChangeLog-7.php#7.3.21
 - https://www.php.net/ChangeLog-7.php#7.3.22
 - https://www.php.net/ChangeLog-7.php#7.3.23
2020-10-02 13:07:25 +02:00
Elis Hirwing a792db658f
php74: 7.4.8 -> 7.4.11
https://www.php.net/ChangeLog-7.php#7.4.9
https://www.php.net/ChangeLog-7.php#7.4.10
https://www.php.net/ChangeLog-7.php#7.4.11
2020-10-02 12:58:58 +02:00
Konrad Borowski 1d43f3490e php: use system-sendmail
By default PHP is looking for sendmail in /usr/bin/sendmail
which isn't a correct path for NixOS.
2020-08-21 12:37:46 +02:00
Elis Hirwing 6be7d1c176
php: Drop PHP 7.2 support 2020-08-10 22:28:12 +02:00
Maximilian Bosch db2a5bf3b9
Merge pull request #92928 from etu/php72-update
php72: 7.2.31 -> 7.2.32
2020-07-11 18:27:37 +02:00
Maximilian Bosch f510162d69
Merge pull request #92927 from etu/php73-update
php73: 7.3.19 -> 7.3.20
2020-07-11 18:27:22 +02:00
Elis Hirwing 49316cca66
php74: 7.4.7 -> 7.4.8
Changelog: https://www.php.net/ChangeLog-7.php#7.4.8
2020-07-11 15:07:44 +02:00
Elis Hirwing 86ed3bf578
php72: 7.2.31 -> 7.2.32
Changelog: https://www.php.net/ChangeLog-7.php#7.2.32
2020-07-11 14:49:37 +02:00
Elis Hirwing ef4f6dba94
php73: 7.3.19 -> 7.3.20
Changelog: https://www.php.net/ChangeLog-7.php#7.3.20
2020-07-11 14:46:29 +02:00
Maximilian Bosch af064a0e12
php7{2,3}: fix darwin build
* Backported patches from `php-7.4` which fixes the env for all
  `gettext` and `zlib` tests.
* Setting `--with-libxml-dir` is still needed for versions 7.2 and 7.3.
2020-06-25 22:29:23 +02:00
Christian Kauhaus 1d805c99bd php: 7.2.29 -> 7.2.31, 7.3.16 -> 7.3.19, 7.4.6 -> 7.4.7
Point releases contain several security updates and bugfixes.

Changelog: https://www.php.net/ChangeLog-7.php#7.4.7

Fixes #88381
2020-06-25 15:41:31 +02:00
John Ericson c1b9f86cdd php < 7.4: Fix validation of PKG_CONFIG var
They were assuming it is an absolute path, but it (conventionally) can
be something to look up on the PATH too.

Fixes #90202
2020-06-13 19:06:33 +00:00
talyz bfdc832aef
php.buildEnv: Let enabled extensions to pass through by default
If only extraConfig is specified in buildEnv, keep the currently
enabled extensions active. Brought up in #89011.
2020-05-29 00:32:12 +02:00
Elis Hirwing a779efcaa0
php74: 7.4.5 -> 7.4.6
Changelog: https://www.php.net/ChangeLog-7.php#7.4.6
2020-05-16 13:23:23 +02:00
Elis Hirwing 52d2e99182
php74: 7.4.4 -> 7.4.5
Changelog: https://www.php.net/ChangeLog-7.php#7.4.5
2020-05-15 22:10:03 +02:00
talyz 9f09253e52
php.buildPecl: Allow PECLs to depend on other PECLs
Some PECLs depend on other PECLs and, like internal PHP extension
dependencies, need to be loaded in the correct order. This makes this
possible by adding the argument "peclDeps" to buildPecl, which adds
the extension to buildInputs and is treated the same way as
internalDeps when the extension config is generated.
2020-05-09 23:38:21 +02:00
Luke Granger-Brown c13df548a3 php: override outputsToInstall when using withExtensions
At the moment, using .withExtensions on a PHP derivation will
produce something which can't be used inside an
environment.systemPackages array, because outputsToInstall refers
to an output which doesn't exist on the final derivation.

Instead, override it back to just containing the single output
"out".
2020-05-06 21:44:27 +01:00
Elis Hirwing 6d5b0b13f3
php: Set maintainer team as maintainers
Also passthrough the meta of the package to have description,
homepage, license, maintainers and other metadata passed through to
the commonly used attribute.
2020-04-29 20:11:40 +02:00
talyz 2535cdfe91
php: Unify the usage of the php package in php-packages.nix
Instead of using two different php packages in php-packages.nix, one
wrapper and one unwrapped, simply use the wrapper and use its
"unwrapped" attribute when necessary. Also, get rid of the packages
and extensions attributes from the base package, since they're no
longer needed.
2020-04-29 13:59:29 +02:00
talyz 5cad1b4aff
php: Get rid of the phpXXbase attributes, update docs
Since the introduction of php.unwrapped there's no real need for the
phpXXbase attributes, so let's remove them to lessen potential
confusion and clutter. Also update the docs to make it clear how to
get hold of an unwrapped PHP if needed.
2020-04-29 13:45:48 +02:00
talyz 3bfd4e864f
php: Add passthru.tests 2020-04-29 13:45:07 +02:00
talyz ef990961bc
php.buildEnv: Provide the unwrapped php package in php.unwrapped
This is useful if you need to access the dev output of the unwrapped
derivation.
2020-04-29 13:44:20 +02:00
talyz c3d5d92f4a
php.buildEnv: Add phpIni attribute for easy access to the php.ini 2020-04-29 12:12:59 +02:00
talyz d61040716e
php.buildEnv: Automatically include extension dependencies
Some extensions depend on other extensions. Previously, these had to
be added manually to the list of included extensions, or we got a
cryptic error message pointing to strings-with-deps.nix, which wasn't
very helpful. This makes sure all required extensions are included in
the set from which textClosureList chooses its snippets.
2020-04-26 16:43:29 +02:00
talyz 72636bc2f6
php: Get rid of all config.php parameters
Since all options controlled by the config.php parameters can now be
overridden directly, there's no reason to keep them around.
2020-04-26 16:43:23 +02:00
talyz 2ba7926959
php.buildEnv: Provide a list of currently enabled extensions
Rework withExtensions / buildEnv to handle currently enabled
extensions better and make them compatible with override. They now
accept a function with the named arguments enabled and all, where
enabled is a list of currently enabled extensions and all is the set
of all extensions. This gives us several nice properties:

 - You always get the right version of the list of currently enabled
   extensions

 - Invocations chain

 - It works well with overridden PHP packages - you always get the
   correct versions of extensions

As a contrived example of what's possible, you can add ImageMagick,
then override the version and disable fpm, then disable cgi, and
lastly remove the zip extension like this:

{ pkgs ? (import <nixpkgs>) {} }:
with pkgs;

let
  phpWithImagick = php74.withExtensions ({ all, enabled }: enabled ++ [ all.imagick ]);

  phpWithImagickWithoutFpm743 = phpWithImagick.override {
    version = "7.4.3";
    sha256 = "wVF7pJV4+y3MZMc6Ptx21PxQfEp6xjmYFYTMfTtMbRQ=";
    fpmSupport = false;
  };

  phpWithImagickWithoutFpmZip743 = phpWithImagickWithoutFpm743.withExtensions (
    { enabled, all }:
      lib.filter (e: e != all.zip) enabled);

  phpWithImagickWithoutFpmZipCgi743 = phpWithImagickWithoutFpmZip743.override {
    cgiSupport = false;
  };
in
  phpWithImagickWithoutFpmZipCgi743
2020-04-26 16:43:05 +02:00
talyz abedfadd73
php.buildEnv: Respect override
Make buildEnv take earlier overridden values into account by
forwarding all arguments (a merge of generic's arguments, all previous
arguments and the current arguments) to the next invocation of
buildEnv.
2020-04-24 18:48:29 +02:00
talyz dde5f5f899
php: Make all arguments to a PHP build overridable
Make all arguments to a PHP build overridable; i.e, both configuration
flags, such as valgrindSupport, and packages, such as valgrind:

php.override { valgrindSupport = false; valgrind = valgrind-light; }

This applies to packages built by generic and buildEnv/withExtensions;
i.e, it works with both phpXX and phpXXBase packages.

The following changes were also made to facilitate this:

 - generic and generic' are merged into one function

 - generic now takes all required arguments for a complete build and
   is meant to be called by callPackage

 - The main function called from all-packages.nix no longer takes all
   required arguments for a complete build - all arguments passed to it
   are however forwarded to the individual builds, thus default
   arguments can still be overridden from all-packages.nix
2020-04-24 18:41:53 +02:00
talyz a463261415
php.buildEnv: Make the exported php package overridable
This implements the override pattern for builds done with buildEnv, so
that we can, for example, write

php.override { fpmSupport = false; }

and get a PHP package with the default extensions enabled, but PHP
compiled without fpm support.
2020-04-24 13:05:37 +02:00
talyz 472d5c187b
php.buildEnv: Don't inherit dev from the original php
mkDerivation uses the dev output in buildInputs if it exits, hence the
php-with-extensions package was never built or put into the path of
packages dependent on it during build. With this fix, the php packages
built with buildEnv or withExtensions don't have any dev outputs;
packages which need the dev output can refer to the phpXXbase packages
instead.
2020-04-08 15:13:07 +02:00
Elis Hirwing 8272ebe961
php72: 7.2.28 -> 7.2.29
Changelog: https://www.php.net/ChangeLog-7.php#7.2.29
2020-04-05 22:22:40 +02:00
Elis Hirwing 1118080dc0
php73: 7.3.15 -> 7.3.16
Changelog: https://www.php.net/ChangeLog-7.php#7.3.16
2020-04-05 22:22:26 +02:00
Elis Hirwing faf79b6384
php74: 7.4.3 -> 7.4.4
Changelog: https://www.php.net/ChangeLog-7.php#7.4.4
2020-04-05 22:05:16 +02:00
talyz ca8b8a26e9
php: Add enabledExtensions attribute to PHP derivations
This provides a means to build a PHP package based on a list of
extensions from another.

For example, to generate a package with all default extensions
enabled, except opcache, but with ImageMagick:

php.withExtensions (e:
  (lib.filter (e: e != php.extensions.opcache) php.enabledExtensions)
  ++ [ e.imagick ])
2020-04-05 16:46:38 +02:00
talyz b4d289a7ae
php: Add missing hash extension to php < 7.4 2020-04-05 16:45:53 +02:00
talyz 1345e5b763
php: Add withExtensions as a simpler alternative to buildEnv 2020-04-05 16:45:47 +02:00
talyz 4ff523f691
php: Simplify php-packages import, rename exts -> extensions 2020-04-05 16:45:41 +02:00