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-10-25 09:06:53 +00:00
|
|
|
version = "2.0.3";
|
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-10-25 09:06:53 +00:00
|
|
|
sha256 = "47e86a084dd814fac88c99ea34ba3278a74bc9de5a25f4b815b608798747c7dc";
|
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; [ ];
|
|
|
|
};
|
|
|
|
}
|