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