1{ buildPythonPackage, lib, fetchPypi, isPy27
2, ipaddress
3, maxminddb
4, mock
5, requests
6, requests-mock
7}:
8
9buildPythonPackage rec {
10 version = "3.0.0";
11 pname = "geoip2";
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "1q1ciqqd0qjkpgwsg9fws8wcqchkcq84gv2g4q3xgh2lpj3yjsaq";
16 };
17
18 propagatedBuildInputs = [ requests maxminddb ]
19 ++ lib.optionals isPy27 [ ipaddress ];
20
21 checkInputs = [ requests-mock ];
22
23 meta = with lib; {
24 description = "MaxMind GeoIP2 API";
25 homepage = "https://www.maxmind.com/en/home";
26 license = licenses.asl20;
27 maintainers = with maintainers; [ ];
28 };
29}