From ef990961bc98e6b8dbad47b0ea0da2b302df5476 Mon Sep 17 00:00:00 2001 From: talyz Date: Fri, 24 Apr 2020 21:28:33 +0200 Subject: php.buildEnv: Provide the unwrapped php package in php.unwrapped This is useful if you need to access the dev output of the unwrapped derivation. --- doc/languages-frameworks/php.section.md | 7 +++++++ pkgs/development/interpreters/php/default.nix | 1 + 2 files changed, 8 insertions(+) diff --git a/doc/languages-frameworks/php.section.md b/doc/languages-frameworks/php.section.md index 31190f3b51a..abf91a31769 100644 --- a/doc/languages-frameworks/php.section.md +++ b/doc/languages-frameworks/php.section.md @@ -66,6 +66,13 @@ ignore `enabled`: php.withExtensions ({ all, ... }: with all; [ opcache imagick ]) ``` +`php.withExtensions` provides extensions by wrapping a minimal php +base package, providing a `php.ini` file listing all extensions to be +loaded. You can access this package through the `php.unwrappedPhp` +attribute; useful if you, for example, need access to the `dev` +output. The generated `php.ini` file can be accessed through the +`php.phpIni` attribute. + If you want a PHP build with extra configuration in the `php.ini` file, you can use `php.buildEnv`. This function takes two named and optional parameters: `extensions` and `extraConfig`. `extensions` diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index 4256e34980d..78dc5d2e98a 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -119,6 +119,7 @@ let buildEnv = mkBuildEnv allArgs allExtensionFunctions; withExtensions = mkWithExtensions allArgs allExtensionFunctions; phpIni = "${phpWithExtensions}/lib/php.ini"; + unwrapped = php; inherit (php-packages) packages extensions; }; paths = [ php ]; -- cgit 1.4.1