Merge pull request #273378 from shyim/frankenphp-extension-support
frankenphp: fix php extensions loading
This commit is contained in:
commit
8d17fb2bc6
@ -7,6 +7,7 @@
|
||||
, frankenphp
|
||||
, darwin
|
||||
, pkg-config
|
||||
, makeBinaryWrapper
|
||||
, runCommand
|
||||
, writeText
|
||||
}:
|
||||
@ -41,7 +42,7 @@ in buildGoModule rec {
|
||||
vendorHash = "sha256-Lgj/pFtSQIgjrycajJ1zNY3ytvArmuk0E3IjsAzsNdM=";
|
||||
|
||||
buildInputs = [ phpUnwrapped ] ++ phpUnwrapped.buildInputs;
|
||||
nativeBuildInputs = lib.optionals stdenv.isDarwin [ pkg-config darwin.cctools darwin.autoSignDarwinBinariesHook ];
|
||||
nativeBuildInputs = [ makeBinaryWrapper ] ++ lib.optionals stdenv.isDarwin [ pkg-config darwin.cctools darwin.autoSignDarwinBinariesHook ];
|
||||
|
||||
subPackages = [ "frankenphp" ];
|
||||
|
||||
@ -63,10 +64,13 @@ in buildGoModule rec {
|
||||
# replace hard-code homebrew path
|
||||
substituteInPlace ../frankenphp.go \
|
||||
--replace "-L/opt/homebrew/opt/libiconv/lib" "-L${darwin.libiconv}/lib"
|
||||
'';
|
||||
|
||||
# remove when https://github.com/dunglas/frankenphp/pull/331 is merged and released
|
||||
substituteInPlace ../frankenphp.go \
|
||||
--replace "darwin pkg-config: libxml-2.0 sqlite3" "darwin pkg-config: libxml-2.0"
|
||||
preFixup = ''
|
||||
mkdir -p $out/lib
|
||||
ln -s "${phpEmbedWithZts}/lib/php.ini" "$out/lib/php.ini"
|
||||
|
||||
wrapProgram $out/bin/frankenphp --set-default PHP_INI_SCAN_DIR $out/lib
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
@ -476,6 +476,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||
lib.optional
|
||||
(!stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind)
|
||||
valgrind.dev;
|
||||
configureFlags = lib.optional php.ztsSupport "--disable-opcache-jit";
|
||||
zendExtension = true;
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
# Tests are flaky on darwin
|
||||
|
Loading…
Reference in New Issue
Block a user