summary refs log tree commit diff
path: root/pkgs/development/python-modules/geoip2/default.nix
blob: 5d26793250c4642a1356c2073ea7528c69bcb959 (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
{ buildPythonPackage, lib, fetchPypi, isPy27
, ipaddress
, maxminddb
, mock
, requests
, requests-mock
}:

buildPythonPackage rec {
  version = "2.9.0";
  pname = "geoip2";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp";
  };

  propagatedBuildInputs = [ requests maxminddb ]
    ++ lib.optionals isPy27 [ ipaddress ];

  checkInputs = [ requests-mock ];

  meta = with lib; {
    description = "MaxMind GeoIP2 API";
    homepage = "https://www.maxmind.com/en/home";
    license = licenses.asl20;
    maintainers = with maintainers; [ ];
  };
}