diff --git a/pkgs/development/python-modules/bson/default.nix b/pkgs/development/python-modules/bson/default.nix index c7fc3443f7c5..7e18eb6bcb96 100644 --- a/pkgs/development/python-modules/bson/default.nix +++ b/pkgs/development/python-modules/bson/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + fetchpatch, python-dateutil, six, pytestCheckHook, @@ -19,6 +20,16 @@ buildPythonPackage rec { hash = "sha256-mirRpo27RoOBlwxVOKnHaDIzJOErp7c2VxCOunUm/u4="; }; + patches = [ + # Upstream PR: https://github.com/py-bson/bson/pull/140 + (fetchpatch { + name = "python-3.14.patch"; + url = "https://github.com/py-bson/bson/commit/4e6b4c206f7204034ef74bff8ae84a95d76d1684.patch"; + includes = [ "setup.py" ]; + hash = "sha256-JOmW/KMqzFdXKH4TMR/PG1YU3SvLTBc3L3E9kXag3bQ="; + }) + ]; + postPatch = '' find . -type f -name '*.py' -exec sed -i 's|assertEquals|assertEqual|g' {} + '';