1{ lib
2, buildPythonPackage
3, fetchPypi
4, pkgs
5, python
6}:
7
8buildPythonPackage rec {
9 pname = "bsddb3";
10 version = "6.2.9";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "70d05ec8dc568f42e70fc919a442e0daadc2a905a1cfb7ca77f549d49d6e7801";
15 };
16
17 buildInputs = [ pkgs.db ];
18
19 checkPhase = ''
20 ${python.interpreter} test.py
21 '';
22
23 # Path to database need to be set.
24 # Somehow the setup.py flag is not propagated.
25 #setupPyBuildFlags = [ "--berkeley-db=${pkgs.db}" ];
26 # We can also use a variable
27 preConfigure = ''
28 export BERKELEYDB_DIR=${pkgs.db.dev};
29 '';
30
31 meta = with lib; {
32 description = "Python bindings for Oracle Berkeley DB";
33 homepage = "https://www.jcea.es/programacion/pybsddb.htm";
34 license = with licenses; [ agpl3 ]; # License changed from bsd3 to agpl3 since 6.x
35 maintainers = [ ];
36 };
37
38}