2019-07-04 17:30:50 +02:00
|
|
|
{ buildPythonPackage, lib, fetchPypi, isPy27
|
2020-08-17 14:40:55 +02:00
|
|
|
, aiohttp
|
2019-07-04 17:30:50 +02:00
|
|
|
, maxminddb
|
|
|
|
, mock
|
2020-08-17 14:40:55 +02:00
|
|
|
, mocket
|
2019-07-04 17:30:50 +02:00
|
|
|
, requests
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-09-30 17:12:26 +02:00
|
|
|
version = "4.1.0";
|
2019-07-04 17:30:50 +02:00
|
|
|
pname = "geoip2";
|
2020-08-17 14:40:55 +02:00
|
|
|
disabled = isPy27;
|
2019-07-04 17:30:50 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-09-30 17:12:26 +02:00
|
|
|
sha256 = "57d8d15de2527e0697bbef44fc16812bba709f03a07ef99297bd56c1df3b1efd";
|
2019-07-04 17:30:50 +02:00
|
|
|
};
|
|
|
|
|
2020-08-17 14:40:55 +02:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace requirements.txt --replace "requests>=2.24.0,<3.0.0" "requests"
|
|
|
|
'';
|
2019-07-04 17:30:50 +02:00
|
|
|
|
2020-08-17 14:40:55 +02:00
|
|
|
propagatedBuildInputs = [ aiohttp requests maxminddb ];
|
|
|
|
|
|
|
|
checkInputs = [ mocket requests-mock ];
|
2019-07-04 17:30:50 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "MaxMind GeoIP2 API";
|
|
|
|
homepage = "https://www.maxmind.com/en/home";
|
2019-10-20 15:03:02 +02:00
|
|
|
license = licenses.asl20;
|
2019-07-04 17:30:50 +02:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|