1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, pkgs
5, python
6}:
7
8buildPythonPackage rec {
9 pname = "bsddb3";
10 version = "6.2.6";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "42d621f4037425afcb16b67d5600c4556271a071a9a7f7f2c2b1ba65bc582d05";
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 stdenv.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 = [ maintainers.costrouc ];
36 };
37
38}