2020-08-20 17:08:02 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, pythonOlder, pythonAtLeast
|
2020-07-18 16:06:22 +00:00
|
|
|
, fetchPypi
|
|
|
|
, libmaxminddb
|
2020-04-24 23:36:52 +00:00
|
|
|
, ipaddress
|
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-09-23 15:35:13 +00:00
|
|
|
version = "2.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "maxminddb";
|
2020-08-20 17:08:02 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-09-23 15:35:13 +00:00
|
|
|
sha256 = "c47b8acba98d03b8c762684d899623c257976f3eb0c9d557ff865d20cddc9d6b";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
buildInputs = [ libmaxminddb ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ ipaddress ];
|
|
|
|
|
|
|
|
checkInputs = [ nose mock ];
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
# Tests are broken for macOS on python38
|
|
|
|
doCheck = !(stdenv.isDarwin && pythonAtLeast "3.8");
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Reader for the MaxMind DB format";
|
|
|
|
homepage = "https://www.maxmind.com/en/home";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|