1{
2 buildPecl,
3 lib,
4 fetchFromGitHub,
5 libmaxminddb,
6}:
7let
8 pname = "maxminddb";
9 version = "1.12.1";
10in
11buildPecl {
12 inherit pname version;
13
14 src = fetchFromGitHub {
15 owner = "maxmind";
16 repo = "MaxMind-DB-Reader-php";
17 rev = "v${version}";
18 sha256 = "sha256-VsQOztF4TN3XgJjf3mZa1/Y5+6ounbkLRAzawLSX+BI=";
19 };
20
21 prePatch = ''
22 cd ext
23 '';
24
25 buildInputs = [ libmaxminddb ];
26
27 meta = with lib; {
28 description = "C extension that is a drop-in replacement for MaxMind\\Db\\Reader";
29 license = with licenses; [ asl20 ];
30 homepage = "https://github.com/maxmind/MaxMind-DB-Reader-php";
31 teams = [
32 teams.helsinki-systems
33 teams.php
34 ];
35 };
36}