nixpkgs/nixos/modules
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
..
config treewide/nixos: use stdenv.cc.libc instead of glibc when available 2020-04-06 16:36:27 -04:00
hardware libtxc_dxtn{,_s2tc}: remove from nixpkgs + hardware.opengl options 2020-04-20 03:19:41 +02:00
i18n/input-method nixos/ibus: fix evaluation 2020-04-05 02:23:38 +02:00
installer installation-cd-graphical-gnome: don't run xorg default 2020-04-21 15:26:25 -04:00
misc Update link in /etc/os-release (#85723) 2020-04-22 00:16:22 +02:00
profiles nixos/hardened: add emily to maintainers 2020-04-17 16:13:39 +01:00
programs treewide: add bool type to enable options, or make use of mkEnableOption 2020-04-21 08:55:36 +02:00
security Merge pull request #85365 from immae/fix_acme_postrun 2020-04-18 13:16:16 -04:00
services php.buildEnv: Provide a list of currently enabled extensions 2020-04-26 16:43:05 +02:00
system Merge pull request #85735 from nh2/journald-storage-limit-logs 2020-04-23 13:35:12 +02:00
tasks nixos/networking: move network-link-${i.name} to scripted networking 2020-04-13 22:03:35 +02:00
testing nixos/service-runner.nix: Allow quotes in commands + test 2020-02-28 14:26:29 +01:00
virtualisation Merge pull request #85894 from zowoq/podman-crio 2020-04-24 11:34:07 +02:00
module-list.nix nixos.virtualisation.containers: Init common /etc/containers configuration module 2020-04-21 10:38:39 +01:00
rename.nix nixos: fix module paths in rename.nix 2020-03-11 15:59:22 +01:00