Files
nixpkgs/pkgs/development/interpreters
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-10-06 17:46:34 -07:00
2020-04-17 00:28:12 +02:00
2020-04-07 12:24:19 -07:00
2019-12-15 13:31:53 -08:00
2019-11-13 16:27:38 +01:00
2020-04-20 06:27:20 +10:00
2020-04-01 13:24:36 +00:00
2019-12-31 00:15:46 +01:00
2020-04-05 22:01:56 +00:00
2020-04-05 22:06:39 +00:00
2020-02-23 13:41:27 -08:00
2020-02-10 20:03:47 +01:00
2019-11-18 20:10:43 +00:00
2020-01-03 10:57:55 +01:00
2020-01-30 18:35:30 -05:00
2020-04-21 11:21:39 +02:00
2020-03-12 19:06:47 +01:00
2020-04-18 21:30:29 +02:00