2021-03-09 03:18:52 +00:00
|
|
|
{ buildPythonPackage, lib, fetchPypi, pythonOlder
|
2020-08-20 17:08:02 +00:00
|
|
|
, aiohttp
|
2020-04-24 23:36:52 +00:00
|
|
|
, maxminddb
|
2020-08-20 17:08:02 +00:00
|
|
|
, mocket
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests
|
|
|
|
, requests-mock
|
2021-03-09 03:18:52 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-10-07 09:15:18 +00:00
|
|
|
version = "4.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "geoip2";
|
2021-03-09 03:18:52 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-07 09:15:18 +00:00
|
|
|
sha256 = "57d8d15de2527e0697bbef44fc16812bba709f03a07ef99297bd56c1df3b1efd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace requirements.txt --replace "requests>=2.24.0,<3.0.0" "requests"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
propagatedBuildInputs = [ aiohttp requests maxminddb ];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
checkInputs = [
|
|
|
|
mocket
|
|
|
|
requests-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "geoip2" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-03-09 03:18:52 +00:00
|
|
|
description = "Python client for GeoIP2 webservice client and database reader";
|
|
|
|
homepage = "https://github.com/maxmind/GeoIP2-python";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|