php: Wrap the programs and provide an environment variable instead of a flag

This commit is contained in:
Elis Hirwing 2020-03-28 09:57:04 +01:00 committed by talyz
parent 9ac0d9ad61
commit 82cd2fbbf4
No known key found for this signature in database
GPG key ID: 2DED2151F4671A2B

View file

@ -192,10 +192,13 @@ let
}; };
paths = [ php ]; paths = [ php ];
postBuild = '' postBuild = ''
wrapProgram $out/bin/php \ cp ${extraInit} $out/lib/custom-php.ini
--add-flags "-c ${extraInit}"
wrapProgram $out/bin/php-fpm \ wrapProgram $out/bin/php --set PHP_INI_SCAN_DIR $out/lib
--add-flags "-c ${extraInit}"
if test -e $out/bin/php-fpm; then
wrapProgram $out/bin/php-fpm --set PHP_INI_SCAN_DIR $out/lib
fi
''; '';
}; };
in in