1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 patch-ng,
7 pytestCheckHook,
8 cffi,
9 lmdb,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "lmdb";
15 version = "1.7.3";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-1KJ7evT+OPNAnZ+/v0e2F7PZTe6YoAvIwqgzbM0/mxU=";
23 };
24
25 build-system = [ setuptools ];
26
27 buildInputs = [ lmdb ];
28
29 nativeBuildInputs = [ cffi ];
30
31 env.LMDB_FORCE_SYSTEM = 1;
32
33 dependencies = [ patch-ng ];
34
35 pythonImportsCheck = [ "lmdb" ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 meta = {
40 description = "Universal Python binding for the LMDB 'Lightning' Database";
41 homepage = "https://github.com/dw/py-lmdb";
42 changelog = "https://github.com/jnwatson/py-lmdb/blob/py-lmdb_${version}/ChangeLog";
43 license = lib.licenses.openldap;
44 maintainers = with lib.maintainers; [
45 ivan
46 ];
47 };
48}