2020-08-17 13:19:30 +01:00
|
|
|
{ stdenv, lib, buildPythonPackage, pythonOlder, pythonAtLeast
|
2020-07-12 05:16:20 +01:00
|
|
|
, fetchPypi
|
|
|
|
, libmaxminddb
|
2019-07-04 16:27:15 +01:00
|
|
|
, ipaddress
|
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-08-16 18:31:07 +01:00
|
|
|
version = "2.0.2";
|
2019-07-04 16:27:15 +01:00
|
|
|
pname = "maxminddb";
|
2020-08-17 13:19:30 +01:00
|
|
|
disabled = pythonOlder "3.6";
|
2019-07-04 16:27:15 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 18:31:07 +01:00
|
|
|
sha256 = "b95d8ed21799e6604683669c7ed3c6a184fcd92434d5762dccdb139b4f29e597";
|
2019-07-04 16:27:15 +01:00
|
|
|
};
|
|
|
|
|
2020-07-12 05:16:20 +01:00
|
|
|
buildInputs = [ libmaxminddb ];
|
|
|
|
|
2019-07-04 16:27:15 +01:00
|
|
|
propagatedBuildInputs = [ ipaddress ];
|
|
|
|
|
|
|
|
checkInputs = [ nose mock ];
|
|
|
|
|
2020-07-12 05:16:20 +01:00
|
|
|
# Tests are broken for macOS on python38
|
|
|
|
doCheck = !(stdenv.isDarwin && pythonAtLeast "3.8");
|
|
|
|
|
2019-07-04 16:27:15 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Reader for the MaxMind DB format";
|
|
|
|
homepage = "https://www.maxmind.com/en/home";
|
2019-10-18 16:14:10 +01:00
|
|
|
license = licenses.asl20;
|
2019-07-04 16:27:15 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|