diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2024-06-20 16:26:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 16:26:33 +0200 |
commit | 372ef6d265cd75be5dbd5f83feea8e8a528db20c (patch) | |
tree | 9140e2a11b75e264c08f72322d790454e1f11d4c | |
parent | 8c457ff332d3c2ef6a69fe702b7f23833098d868 (diff) | |
parent | 10e9deb7982f659c05bb0304ec09ee862e6395b1 (diff) |
Merge pull request #311198 from AkechiShiro/mark-broken-bsdbb3-and-replace-by-berkeleydb
-rw-r--r-- | pkgs/applications/audio/exaile/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/misc/gramps/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/python-modules/berkeleydb/default.nix | 38 | ||||
-rw-r--r-- | pkgs/development/python-modules/bsddb3/default.nix | 22 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
5 files changed, 57 insertions, 9 deletions
diff --git a/pkgs/applications/audio/exaile/default.nix b/pkgs/applications/audio/exaile/default.nix index 036bcc70ddd0e..4f49564898a9a 100644 --- a/pkgs/applications/audio/exaile/default.nix +++ b/pkgs/applications/audio/exaile/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { gst-plugins-ugly gst-libav ]) ++ (with python3.pkgs; [ - bsddb3 + berkeleydb dbus-python mutagen pygobject3 diff --git a/pkgs/applications/misc/gramps/default.nix b/pkgs/applications/misc/gramps/default.nix index 7feab95b003a1..5ecab79226c8c 100644 --- a/pkgs/applications/misc/gramps/default.nix +++ b/pkgs/applications/misc/gramps/default.nix @@ -69,7 +69,7 @@ buildPythonApplication rec { ; propagatedBuildInputs = with pythonPackages; [ - bsddb3 + berkeleydb pyicu pygobject3 pycairo diff --git a/pkgs/development/python-modules/berkeleydb/default.nix b/pkgs/development/python-modules/berkeleydb/default.nix new file mode 100644 index 0000000000000..514a9b0c689ab --- /dev/null +++ b/pkgs/development/python-modules/berkeleydb/default.nix @@ -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 = [ ]; + }; +} diff --git a/pkgs/development/python-modules/bsddb3/default.nix b/pkgs/development/python-modules/bsddb3/default.nix index fbf29c4f7eac0..af25971df03b8 100644 --- a/pkgs/development/python-modules/bsddb3/default.nix +++ b/pkgs/development/python-modules/bsddb3/default.nix @@ -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"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8389ef11a8dd8..b8ebedd193c52 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -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 { }; |