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
..
2019-06-07 13:02:51 +02:00
2020-03-26 09:28:42 +01:00
2020-02-09 21:55:27 +01:00
2020-02-09 21:55:27 +01:00
2020-01-31 20:39:12 -05:00
2019-11-18 14:52:47 +01:00
2020-01-31 20:39:12 -05:00
2019-04-29 14:05:50 +02:00
2020-01-31 20:39:12 -05:00
2019-10-28 21:34:55 +01:00
2019-09-08 23:38:31 +00:00
2019-09-22 18:48:07 +02:00
2019-11-03 17:24:08 +01:00
2019-09-17 00:23:51 +00:00
2019-10-12 22:25:28 +02:00
2020-01-31 20:39:12 -05:00