1{ stdenv, lib, buildPythonPackage, pythonOlder, pythonAtLeast
2, fetchPypi
3, libmaxminddb
4, ipaddress
5, mock
6, nose
7}:
8
9buildPythonPackage rec {
10 version = "2.0.2";
11 pname = "maxminddb";
12 disabled = pythonOlder "3.6";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "b95d8ed21799e6604683669c7ed3c6a184fcd92434d5762dccdb139b4f29e597";
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}