depot/third_party/nixpkgs/pkgs/development/python-modules/bsddb3/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

47 lines
994 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, pkgs
, python
, pythonOlder
}:
buildPythonPackage rec {
pname = "bsddb3";
version = "6.2.9";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "70d05ec8dc568f42e70fc919a442e0daadc2a905a1cfb7ca77f549d49d6e7801";
};
build-system = [
setuptools
];
buildInputs = [ pkgs.db ];
doCheck = pythonOlder "3.12"; # distutils usage
checkPhase = ''
${python.interpreter} test.py
'';
# Path to database need to be set.
# Somehow the setup.py flag is not propagated.
#setupPyBuildFlags = [ "--berkeley-db=${pkgs.db}" ];
# We can also use a variable
preConfigure = ''
export BERKELEYDB_DIR=${pkgs.db.dev};
'';
meta = with lib; {
description = "Python bindings for Oracle Berkeley DB";
homepage = "https://www.jcea.es/programacion/pybsddb.htm";
license = with licenses; [ agpl3Only ]; # License changed from bsd3 to agpl3 since 6.x
maintainers = [ ];
};
}