nixpkgs/doc
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
..
builders treewide: per RFC45, remove more unquoted URLs 2020-04-18 14:04:37 +02:00
contributing jdiskreport: remove builder.sh link from docs 2020-02-10 20:17:59 +01:00
doc-support Revert "make-tarball.nix: Restore the 'commit' field in packages.json" 2020-03-29 20:57:50 +02:00
functions Merge pull request #68491 from roberth/fix-dontRecurseIntoAttrs 2020-03-01 11:05:34 +01:00
languages-frameworks php.buildEnv: Provide a list of currently enabled extensions 2020-04-26 16:43:05 +02:00
old treewide: per RFC45, remove more unquoted URLs 2020-04-18 14:04:37 +02:00
stdenv Merge remote-tracking branch 'upstream/master' into staging 2020-04-18 15:40:49 -04:00
using doc/using/overlays.xml: update LD_LIBRARY_PATH example 2020-04-22 21:54:41 -04:00
.gitignore doc: format the documentation (#57102) 2019-03-08 21:07:11 -08:00
default.nix doc: move parameters to an XML file 2019-07-04 09:16:06 -04:00
functions.xml doc: move fhs and mkShell under builders/special 2019-10-21 11:39:46 +02:00
Makefile nixpkgs manual: fix build after pandoc(?) update 2020-03-02 08:24:54 +01:00
manual.xml nixpkgs manual: move builders into one folder 2019-10-30 11:17:14 +01:00
overrides.css doc: Make callout marks in code unselectable 2020-01-14 15:24:57 +01:00
preface.chapter.md nixpkgs manual preface: change howoldis link to status page link 2020-04-02 21:52:44 -04:00
release-notes.xml treewide: per RFC45, remove more unquoted URLs 2020-04-18 14:04:37 +02:00
shell.nix Generate links to function definitions 2018-10-05 11:20:46 -04:00
style.css manual: limit text width 2019-01-08 15:08:42 +00:00