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 {
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "2.0.2";
|
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;
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "b95d8ed21799e6604683669c7ed3c6a184fcd92434d5762dccdb139b4f29e597";
|
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; [ ];
|
|
|
|
};
|
|
|
|
}
|