1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 pkgs,
7 python,
8}:
9
10buildPythonPackage rec {
11 pname = "berkeleydb";
12 version = "18.1.10";
13 pyproject = true;
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-QmNBoWAHqQAtmHpvTZcib46v/8saBIhIgFPTijEnyBo=";
18 };
19
20 build-system = [ setuptools ];
21
22 checkPhase = ''
23 ${python.interpreter} test.py
24 '';
25
26 # See: https://github.com/NixOS/nixpkgs/pull/311198/files#r1597746759
27 env = {
28 BERKELEYDB_INCDIR = "${lib.getDev pkgs.db}/include";
29 BERKELEYDB_LIBDIR = "${lib.getLib pkgs.db}/lib";
30 };
31
32 meta = with lib; {
33 description = "Python bindings for Oracle Berkeley DB";
34 homepage = "https://www.jcea.es/programacion/pybsddb.htm";
35 license = with licenses; [ bsd3 ];
36 maintainers = [ ];
37 };
38}