nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 libmaxminddb,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "maxminddb";
12 version = "3.0.0";
13 format = "setuptools";
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-l5KxliWUXf8Ubi4xh/nkcLgjMKkS986lWBuL1a8w2os=";
18 };
19
20 buildInputs = [ libmaxminddb ];
21
22 nativeCheckInputs = [ pytestCheckHook ];
23
24 pythonImportsCheck = [ "maxminddb" ];
25
26 # The multiprocessing tests fail on Darwin because multiprocessing uses spawn instead of fork,
27 # resulting in an exception when it can’t pickle the `lookup` local function.
28 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "multiprocessing" ];
29
30 meta = {
31 description = "Reader for the MaxMind DB format";
32 homepage = "https://github.com/maxmind/MaxMind-DB-Reader-python";
33 changelog = "https://github.com/maxmind/MaxMind-DB-Reader-python/blob/v${version}/HISTORY.rst";
34 license = lib.licenses.asl20;
35 maintainers = [ ];
36 };
37}