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