phpExtensions.swoole: 6.1.8 -> 6.2.3

This commit is contained in:
Piotr Kwiecinski
2026-10-16 08:39:04 +00:00
parent 492d73671d
commit cf217864df

View File

@@ -5,11 +5,13 @@
php,
valgrind,
pcre2,
openssl,
pkg-config,
fetchFromGitHub,
}:
let
version = "6.1.8";
version = "6.2.3";
in
buildPecl {
inherit version;
@@ -19,10 +21,23 @@ buildPecl {
owner = "swoole";
repo = "swoole-src";
tag = "v${version}";
hash = "sha256-z/f3GLI/PQJJWcY968fOH00btDaKDx3M0Nb/IOjDgeY=";
hash = "sha256-VAtFR90bnS0ipta/BSOmmcEGTB+rzIQ83hm4lmrPJVI=";
};
buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ valgrind ];
# sw_usleep is undefined in the non-futex (Darwin) path
# https://github.com/swoole/swoole-src/issues/6243
postPatch = ''
substituteInPlace src/core/misc.cc \
--replace-fail "sw_usleep(1000);" "usleep(1000);"
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
openssl
pcre2
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ valgrind ];
# tests require internet access
doCheck = false;