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 env.LMDB_FORCE_SYSTEM = 1;
30
31 dependencies = [ patch-ng ];
32
33 pythonImportsCheck = [ "lmdb" ];
34
35 nativeCheckInputs = [
36 cffi
37 pytestCheckHook
38 ];
39
40 meta = {
41 description = "Universal Python binding for the LMDB 'Lightning' Database";
42 homepage = "https://github.com/dw/py-lmdb";
43 changelog = "https://github.com/jnwatson/py-lmdb/blob/py-lmdb_${version}/ChangeLog";
44 license = lib.licenses.openldap;
45 maintainers = with lib.maintainers; [
46 ivan
47 ];
48 };
49}