1{ stdenv
2, buildPecl
3, fetchFromGitHub
4, lib
5, libiconv
6, pcre2
7, pkg-config
8, cyrus_sasl
9, icu64
10, openssl
11, snappy
12, zlib
13, darwin
14}:
15
16buildPecl rec {
17 pname = "mongodb";
18 version = "1.16.2";
19
20 src = fetchFromGitHub {
21 owner = "mongodb";
22 repo = "mongo-php-driver";
23 rev = version;
24 hash = "sha256-gI1Hd/i3S+lNcXaGG/hBR/cdn3S1fQ6xJ0xtRXo48rI=";
25 fetchSubmodules = true;
26 };
27
28 nativeBuildInputs = [ pkg-config ];
29 buildInputs = [
30 cyrus_sasl
31 icu64
32 openssl
33 snappy
34 zlib
35 pcre2
36 ] ++ lib.optionals stdenv.isDarwin [
37 darwin.apple_sdk_11_0.frameworks.Security
38 darwin.apple_sdk_11_0.Libsystem
39 libiconv
40 ];
41
42 meta = {
43 description = "The Official MongoDB PHP driver";
44 homepage = "https://github.com/mongodb/mongo-php-driver";
45 license = lib.licenses.asl20;
46 maintainers = lib.teams.php.members;
47 };
48}