2019-07-04 16:30:50 +01:00
|
|
|
{ buildPythonPackage, lib, fetchPypi, isPy27
|
|
|
|
, ipaddress
|
|
|
|
, maxminddb
|
|
|
|
, mock
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-01-07 11:41:42 +00:00
|
|
|
version = "3.0.0";
|
2019-07-04 16:30:50 +01:00
|
|
|
pname = "geoip2";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-01-07 11:41:42 +00:00
|
|
|
sha256 = "1q1ciqqd0qjkpgwsg9fws8wcqchkcq84gv2g4q3xgh2lpj3yjsaq";
|
2019-07-04 16:30:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ requests maxminddb ]
|
|
|
|
++ lib.optionals isPy27 [ ipaddress ];
|
|
|
|
|
|
|
|
checkInputs = [ requests-mock ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "MaxMind GeoIP2 API";
|
|
|
|
homepage = "https://www.maxmind.com/en/home";
|
2019-10-20 14:03:02 +01:00
|
|
|
license = licenses.asl20;
|
2019-07-04 16:30:50 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|