diff --git a/pkgs/development/python-modules/levenshtein/cython-3.2-compat.patch b/pkgs/development/python-modules/levenshtein/cython-3.2-compat.patch new file mode 100644 index 000000000000..f57095760350 --- /dev/null +++ b/pkgs/development/python-modules/levenshtein/cython-3.2-compat.patch @@ -0,0 +1,13 @@ +diff --git a/src/Levenshtein/CMakeLists.txt b/src/Levenshtein/CMakeLists.txt +index 721f7a7..f6159ed 100644 +--- a/src/Levenshtein/CMakeLists.txt ++++ b/src/Levenshtein/CMakeLists.txt +@@ -9,7 +9,7 @@ function(create_cython_target _name) + MAIN_DEPENDENCY "${CMAKE_CURRENT_LIST_DIR}/${_name}.pyx" + VERBATIM + COMMAND +- Python::Interpreter -m cython "${CMAKE_CURRENT_LIST_DIR}/${_name}.pyx" ++ Python::Interpreter -m cython --cplus "${CMAKE_CURRENT_LIST_DIR}/${_name}.pyx" + --output-file "${CMAKE_CURRENT_BINARY_DIR}/${_name}.cxx") + + set(${_name} diff --git a/pkgs/development/python-modules/levenshtein/default.nix b/pkgs/development/python-modules/levenshtein/default.nix index a365bcf924a6..a9bba86076d7 100644 --- a/pkgs/development/python-modules/levenshtein/default.nix +++ b/pkgs/development/python-modules/levenshtein/default.nix @@ -23,6 +23,9 @@ buildPythonPackage rec { hash = "sha256-iKWS7gm0t3yPgeX5N09cTa3N1C6GXvIALueO8DlfLfE="; }; + # https://github.com/rapidfuzz/Levenshtein/pull/84 + patches = [ ./cython-3.2-compat.patch ]; + postPatch = '' substituteInPlace pyproject.toml \ --replace-fail "Cython>=3.1.6,<3.2.0" Cython