blob: 65f938fd6a97dacd2a89e00cddcaebaa763645e3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{ buildPythonPackage, lib, fetchPypi, pythonOlder
, aiohttp
, maxminddb
, mocket
, requests
, requests-mock
, urllib3
, pytestCheckHook
}:
buildPythonPackage rec {
version = "4.6.0";
pname = "geoip2";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-8OgLzoCwa7OL0Iv0h31ahONU6TIJXmzPtNJ7tZj6T4M=";
};
patchPhase = ''
substituteInPlace requirements.txt --replace "requests>=2.24.0,<3.0.0" "requests"
'';
propagatedBuildInputs = [ aiohttp maxminddb requests urllib3 ];
checkInputs = [
mocket
requests-mock
pytestCheckHook
];
pythonImportsCheck = [ "geoip2" ];
meta = with lib; {
description = "GeoIP2 webservice client and database reader";
homepage = "https://github.com/maxmind/GeoIP2-python";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}
|