nixpkgs/pkgs
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
..
applications emacsPackages.mandoku-tls: Fix build 2020-04-24 11:35:37 +01:00
build-support Merge master into staging-next 2020-04-23 08:11:16 +02:00
common-updater common-updater: change default development version check to false 2020-04-16 08:06:56 -03:00
data Merge pull request #85889 from emilazy/twitter-color-emoji-12.1.5 2020-04-24 08:59:20 +02:00
desktops gnomeExtensions.dash-to-dock: 2020-03-19 → 2020-04-20 2020-04-23 22:43:33 +02:00
development php.buildEnv: Provide a list of currently enabled extensions 2020-04-26 16:43:05 +02:00
games Merge pull request #84673 from mmilata/qt5-mkDerivation-stdenv 2020-04-22 13:39:46 -04:00
misc mednafen: Add alsaLib to get ALSA audio output 2020-04-23 19:48:35 +02:00
os-specific Set version to 0.0.1 2020-04-23 22:17:30 -04:00
servers grafana: 6.7.2 -> 6.7.3 2020-04-23 10:09:07 -07:00
shells Merge master into staging-next 2020-04-22 17:20:20 +02:00
stdenv Merge branch 'staging-next' into staging 2020-04-13 18:54:59 +02:00
test
tools Merge pull request #85864 from xrelkd/update/powerline-go 2020-04-24 11:25:02 +01:00
top-level php.buildEnv: Make the exported php package overridable 2020-04-24 13:05:37 +02:00