php: Rename extra init file in store and symlink it instead of copying
This commit is contained in:
parent
367d58415c
commit
ac8a8fe2fa
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
generic =
|
generic =
|
||||||
{ callPackage, lib, stdenv, nixosTests, config, fetchurl, makeWrapper
|
{ callPackage, lib, stdenv, nixosTests, fetchurl, makeWrapper
|
||||||
, symlinkJoin, writeText, autoconf, automake, bison, flex, libtool
|
, symlinkJoin, writeText, autoconf, automake, bison, flex, libtool
|
||||||
, pkg-config, re2c, apacheHttpd, libargon2, libxml2, pcre, pcre2
|
, pkg-config, re2c, apacheHttpd, libargon2, libxml2, pcre, pcre2
|
||||||
, systemd, system-sendmail, valgrind, xcbuild
|
, systemd, system-sendmail, valgrind, xcbuild
|
||||||
@ -97,7 +97,7 @@ let
|
|||||||
(enabledExtensions ++ (getDepsRecursively enabledExtensions)));
|
(enabledExtensions ++ (getDepsRecursively enabledExtensions)));
|
||||||
|
|
||||||
extNames = map getExtName enabledExtensions;
|
extNames = map getExtName enabledExtensions;
|
||||||
extraInit = writeText "php.ini" ''
|
extraInit = writeText "php-extra-init-${version}.ini" ''
|
||||||
${lib.concatStringsSep "\n"
|
${lib.concatStringsSep "\n"
|
||||||
(lib.textClosureList extensionTexts extNames)}
|
(lib.textClosureList extensionTexts extNames)}
|
||||||
${extraConfig}
|
${extraConfig}
|
||||||
@ -121,7 +121,7 @@ let
|
|||||||
};
|
};
|
||||||
paths = [ php ];
|
paths = [ php ];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
cp ${extraInit} $out/lib/php.ini
|
ln -s ${extraInit} $out/lib/php.ini
|
||||||
|
|
||||||
wrapProgram $out/bin/php --set PHP_INI_SCAN_DIR $out/lib
|
wrapProgram $out/bin/php --set PHP_INI_SCAN_DIR $out/lib
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user