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