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