1{ stdenv
2, lib
3, buildPythonPackage
4, pythonOlder
5, pythonAtLeast
6, fetchPypi
7, libmaxminddb
8, mock
9, nose
10}:
11
12buildPythonPackage rec {
13 pname = "maxminddb";
14 version = "2.2.0";
15 disabled = pythonOlder "3.6";
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "e37707ec4fab115804670e0fb7aedb4b57075a8b6f80052bdc648d3c005184e5";
20 };
21
22 buildInputs = [ libmaxminddb ];
23
24 checkInputs = [ nose mock ];
25
26 # Tests are broken for macOS on python38
27 doCheck = !(stdenv.isDarwin && pythonAtLeast "3.8");
28
29 meta = with lib; {
30 description = "Reader for the MaxMind DB format";
31 homepage = "https://github.com/maxmind/MaxMind-DB-Reader-python";
32 license = licenses.asl20;
33 maintainers = with maintainers; [ ];
34 };
35}