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.3.0";
15 disabled = pythonOlder "3.6";
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "sha256-Egkg3d2VXzKuSMIHxs72/V3Ih0qIm6lLDywfc27N8wg=";
20 };
21
22 buildInputs = [ libmaxminddb ];
23
24 nativeCheckInputs = [ 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}