nixpkgs-suyu/pkgs/development
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
..
androidndk-pkgs
arduino Merge pull request #84190 from geistesk/platformio-4.3.1 2020-04-17 11:37:07 +01:00
beam-modules
bower-modules/generic
chez-modules
compilers Merge master into staging-next 2020-04-22 17:20:20 +02:00
coq-modules
dhall-modules
dotnet-modules/patches
em-modules/generic
go-modules
go-packages
guile-modules
haskell-modules treewide: per RFC45, remove more unquoted URLs 2020-04-18 14:04:37 +02:00
idris-modules
interpreters php.buildEnv: Provide a list of currently enabled extensions 2020-04-26 16:43:05 +02:00
java-modules
libraries Merge pull request #85901 from zowoq/slirp 2020-04-24 11:37:00 +02:00
lisp-modules
lua-modules
misc
mobile
node-packages vscode-extensions.rust-analyzer: 2020-04-06 -> 2020-04-20 2020-04-23 17:11:22 +08:00
ocaml-modules Merge pull request #85636 from matthewbauer/blas-lapack-fix-fallout-from-83888 2020-04-21 19:59:16 +02:00
perl-modules
pharo
pure-modules
python-modules python3Packages.panel: 0.7.0 -> 0.8.3 2020-04-24 12:09:58 +02:00
r-modules treewide: use blas and lapack 2020-04-17 16:24:09 -05:00
ruby-modules
tools cargo-expand: 0.5.0 -> 0.6.0 2020-04-24 09:40:43 +08:00
web Merge pull request #83054 from peterhoeg/u/icr 2020-04-22 20:31:35 +08:00