nixpkgs/pkgs/development/python-modules/geoip2/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

42 lines
879 B
Nix

{ 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 ];
nativeCheckInputs = [
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; [ ];
};
}