2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, pythonAtLeast
|
2020-07-18 16:06:22 +00:00
|
|
|
, fetchPypi
|
|
|
|
, libmaxminddb
|
2020-04-24 23:36:52 +00:00
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "maxminddb";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2.3.0";
|
2020-08-20 17:08:02 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-Egkg3d2VXzKuSMIHxs72/V3Ih0qIm6lLDywfc27N8wg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
buildInputs = [ libmaxminddb ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ nose mock ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
# Tests are broken for macOS on python38
|
|
|
|
doCheck = !(stdenv.isDarwin && pythonAtLeast "3.8");
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Reader for the MaxMind DB format";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://github.com/maxmind/MaxMind-DB-Reader-python";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|