nixpkgs/doc/languages-frameworks
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
..
android.section.md androidenv: align basic emulateApp usage example 2020-03-09 19:46:46 +00:00
beam.xml beam-modules/hex-snapshot: remove 2019-11-17 13:45:57 +01:00
bower.xml doc: re-format 2019-09-18 22:12:54 +02:00
coq.xml doc: re-format 2019-09-18 22:12:54 +02:00
crystal.section.md crystal: use latest openssl 2020-02-28 01:32:20 -05:00
dotnet.section.md dotnet: add framework doc 2020-02-09 19:26:15 -08:00
emscripten.section.md doc: organize chapters into parts, and reduce toc depth 2019-10-20 13:35:04 +02:00
gnome.xml doc: tiny grammar improvement in the same sentence again 2020-03-10 10:08:26 +01:00
go.xml manual: use quoted homepage urls 2020-02-16 09:49:12 -08:00
haskell.section.md ghcHEAD: bump to 8.11.20200403 (#84217) 2020-04-17 20:50:48 +02:00
idris.section.md manual: use quoted homepage urls 2020-02-16 09:49:12 -08:00
index.xml doc: merge package notes and package-specific notes 2019-10-20 13:35:04 +02:00
ios.section.md xcodeenv: bump default Xcode version to 11.1, default iOS SDK to 13.1. Add troubleshooting section to docs 2019-11-11 00:18:22 +01:00
java.xml doc: re-format 2019-09-18 22:12:54 +02:00
lua.xml doc: re-format 2019-09-18 22:12:54 +02:00
node.section.md doc: organize chapters into parts, and reduce toc depth 2019-10-20 13:35:04 +02:00
ocaml.xml manual: use quoted homepage urls 2020-02-16 09:49:12 -08:00
perl.xml doc: re-format 2019-09-18 22:12:54 +02:00
php.section.md php.buildEnv: Provide a list of currently enabled extensions 2020-04-26 16:43:05 +02:00
python.section.md doc/overlays.xml: update documentation for BLAS/LAPACK 2020-04-21 11:03:10 -05:00
qt.xml doc: re-format 2019-09-18 22:12:54 +02:00
r.section.md doc: organize chapters into parts, and reduce toc depth 2019-10-20 13:35:04 +02:00
ruby.section.md ruby.withPackages: init 2019-09-03 19:44:49 +00:00
ruby.xml treewide: per RFC45, remove more unquoted URLs 2020-04-18 14:04:37 +02:00
rust.section.md rust: remove legacy cargo fetcher 2020-03-18 20:12:32 -07:00
texlive.xml doc/texlive: remove known problems section 2020-04-21 08:09:39 +02:00
titanium.section.md Add Titanium documentation section 2018-12-18 21:16:07 +01:00
vim.section.md vimPlugins: update auto-commiting based on review 2020-04-01 17:19:01 +00:00