2021-02-19 08:21:50 +00:00
|
|
|
{ buildPythonPackage, lib, fetchPypi, pythonOlder
|
2020-08-17 12:40:55 +00:00
|
|
|
, aiohttp
|
2019-07-04 15:30:50 +00:00
|
|
|
, maxminddb
|
2020-08-17 12:40:55 +00:00
|
|
|
, mocket
|
2019-07-04 15:30:50 +00:00
|
|
|
, requests
|
|
|
|
, requests-mock
|
2022-05-30 03:31:11 +00:00
|
|
|
, urllib3
|
2021-02-19 08:21:50 +00:00
|
|
|
, pytestCheckHook
|
2019-07-04 15:30:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-11-25 22:46:47 +00:00
|
|
|
version = "4.5.0";
|
2019-07-04 15:30:50 +00:00
|
|
|
pname = "geoip2";
|
2021-02-19 08:21:50 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2019-07-04 15:30:50 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-11-25 22:46:47 +00:00
|
|
|
sha256 = "b542252e87eb40adc3a2fc0f4e84b514c4c5e04ed46923a3a74d509f25f3103a";
|
2019-07-04 15:30:50 +00:00
|
|
|
};
|
|
|
|
|
2020-08-17 12:40:55 +00:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace requirements.txt --replace "requests>=2.24.0,<3.0.0" "requests"
|
|
|
|
'';
|
2019-07-04 15:30:50 +00:00
|
|
|
|
2022-05-30 03:31:11 +00:00
|
|
|
propagatedBuildInputs = [ aiohttp maxminddb requests urllib3 ];
|
2020-08-17 12:40:55 +00:00
|
|
|
|
2021-02-19 08:21:50 +00:00
|
|
|
checkInputs = [
|
|
|
|
mocket
|
|
|
|
requests-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "geoip2" ];
|
2019-07-04 15:30:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-05-30 03:31:11 +00:00
|
|
|
description = "GeoIP2 webservice client and database reader";
|
2021-02-19 08:21:50 +00:00
|
|
|
homepage = "https://github.com/maxmind/GeoIP2-python";
|
2019-10-20 13:03:02 +00:00
|
|
|
license = licenses.asl20;
|
2019-07-04 15:30:50 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|