Merge pull request #311198 from AkechiShiro/mark-broken-bsdbb3-and-replace-by-berkeleydb
This commit is contained in:
commit
372ef6d265
@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
|
||||
gst-plugins-ugly
|
||||
gst-libav
|
||||
]) ++ (with python3.pkgs; [
|
||||
bsddb3
|
||||
berkeleydb
|
||||
dbus-python
|
||||
mutagen
|
||||
pygobject3
|
||||
|
@ -69,7 +69,7 @@ buildPythonApplication rec {
|
||||
;
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [
|
||||
bsddb3
|
||||
berkeleydb
|
||||
pyicu
|
||||
pygobject3
|
||||
pycairo
|
||||
|
38
pkgs/development/python-modules/berkeleydb/default.nix
Normal file
38
pkgs/development/python-modules/berkeleydb/default.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
setuptools,
|
||||
pkgs,
|
||||
python,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "berkeleydb";
|
||||
version = "18.1.8";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-4YMaeQv9hVdA5cEvlS8Z9kbCaYBs/DYnda/Zh4zzJVc=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} test.py
|
||||
'';
|
||||
|
||||
# See: https://github.com/NixOS/nixpkgs/pull/311198/files#r1597746759
|
||||
env = {
|
||||
BERKELEYDB_INCDIR = "${lib.getDev pkgs.db}/include";
|
||||
BERKELEYDB_LIBDIR = "${lib.getLib pkgs.db}/lib";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for Oracle Berkeley DB";
|
||||
homepage = "https://www.jcea.es/programacion/pybsddb.htm";
|
||||
license = with licenses; [ bsd3 ];
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
pythonAtLeast,
|
||||
python,
|
||||
fetchPypi,
|
||||
setuptools,
|
||||
pkgs,
|
||||
python,
|
||||
pythonOlder,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -22,11 +22,9 @@ buildPythonPackage rec {
|
||||
|
||||
buildInputs = [ pkgs.db ];
|
||||
|
||||
doCheck = pythonOlder "3.12"; # distutils usage
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} test.py
|
||||
'';
|
||||
# See : https://github.com/NixOS/nixpkgs/pull/311198#discussion_r1599257522
|
||||
# More details here : https://www.jcea.es/programacion/pybsddb.htm
|
||||
disabled = pythonAtLeast "3.10";
|
||||
|
||||
# Path to database need to be set.
|
||||
# Somehow the setup.py flag is not propagated.
|
||||
@ -36,6 +34,16 @@ buildPythonPackage rec {
|
||||
export BERKELEYDB_DIR=${pkgs.db.dev};
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace test3.py \
|
||||
--replace-fail "from distutils.util import get_platform" "from sysconfig import get_platform" \
|
||||
--replace-fail "sys.config[0:3]" "sys.implementation.cache_tag"
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} test.py
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for Oracle Berkeley DB";
|
||||
homepage = "https://www.jcea.es/programacion/pybsddb.htm";
|
||||
|
@ -1514,6 +1514,8 @@ self: super: with self; {
|
||||
|
||||
bentoml = callPackage ../development/python-modules/bentoml { };
|
||||
|
||||
berkeleydb = callPackage ../development/python-modules/berkeleydb { };
|
||||
|
||||
bespon = callPackage ../development/python-modules/bespon { };
|
||||
|
||||
betacode = callPackage ../development/python-modules/betacode { };
|
||||
|
Loading…
Reference in New Issue
Block a user