1{
2 buildPecl,
3 lib,
4 php,
5 pkg-config,
6 openssl,
7 libevent,
8}:
9buildPecl {
10 pname = "event";
11
12 version = "3.0.8";
13 sha256 = "sha256-4+ke3T3BXglpuSVMw2Jq4Hgl45vybWG0mTX2b2A9e2s=";
14
15 configureFlags = [
16 "--with-event-libevent-dir=${libevent.dev}"
17 "--with-event-core"
18 "--with-event-extra"
19 "--with-event-pthreads"
20 ];
21
22 postPhpize = ''
23 substituteInPlace configure --replace \
24 'as_fn_error $? "Couldn'\'''t find $phpincludedir/sockets/php_sockets.h. Please check if sockets extension installed" "$LINENO" 5' \
25 ':'
26 '';
27
28 nativeBuildInputs = [ pkg-config ];
29 buildInputs = [
30 openssl
31 libevent
32 ];
33 internalDeps = [ php.extensions.sockets ];
34
35 meta = with lib; {
36 description = "Efficiently schedule I/O, time and signal based events using the best I/O notification mechanism available";
37 license = licenses.php301;
38 homepage = "https://bitbucket.org/osmanov/pecl-event/";
39 teams = [ teams.php ];
40 };
41}