1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-14 08:34:50 +00:00
nixpkgs/pkgs/development/python-modules/geoip2/default.nix

41 lines
886 B
Nix
Raw Normal View History

{ buildPythonPackage, lib, fetchPypi, pythonOlder
2020-08-17 13:40:55 +01:00
, aiohttp
2019-07-04 16:30:50 +01:00
, maxminddb
2020-08-17 13:40:55 +01:00
, mocket
2019-07-04 16:30:50 +01:00
, requests
, requests-mock
, pytestCheckHook
2019-07-04 16:30:50 +01:00
}:
buildPythonPackage rec {
2021-06-18 22:47:17 +01:00
version = "4.2.0";
2019-07-04 16:30:50 +01:00
pname = "geoip2";
disabled = pythonOlder "3.6";
2019-07-04 16:30:50 +01:00
src = fetchPypi {
inherit pname version;
2021-06-18 22:47:17 +01:00
sha256 = "906a1dbf15a179a1af3522970e8420ab15bb3e0afc526942cc179e12146d9c1d";
2019-07-04 16:30:50 +01:00
};
2020-08-17 13:40:55 +01:00
patchPhase = ''
substituteInPlace requirements.txt --replace "requests>=2.24.0,<3.0.0" "requests"
'';
2019-07-04 16:30:50 +01:00
2020-08-17 13:40:55 +01:00
propagatedBuildInputs = [ aiohttp requests maxminddb ];
checkInputs = [
mocket
requests-mock
pytestCheckHook
];
pythonImportsCheck = [ "geoip2" ];
2019-07-04 16:30:50 +01:00
meta = with lib; {
description = "Python client for GeoIP2 webservice client and database reader";
homepage = "https://github.com/maxmind/GeoIP2-python";
license = licenses.asl20;
2019-07-04 16:30:50 +01:00
maintainers = with maintainers; [ ];
};
}