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