pybind11-protobuf: fix build with protobuf 34
Patch pybind11-protobuf to use absl::string_view in proto_cast_util.cc, matching the updated Protobuf/DescriptorDatabase API.
This commit is contained in:
@@ -29,8 +29,15 @@ buildPythonPackage {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Original fix for version pinning
|
||||
substituteInPlace cmake/dependencies/CMakeLists.txt \
|
||||
--replace-fail 'find_package(protobuf 5.29.2 REQUIRED)' 'find_package(protobuf REQUIRED)'
|
||||
|
||||
# Fix for Protobuf 34.0 (absl::string_view migration)
|
||||
substituteInPlace pybind11_protobuf/proto_cast_util.cc \
|
||||
--replace-fail "const std::string& filename" "absl::string_view filename" \
|
||||
--replace-fail "const std::string& symbol_name" "absl::string_view symbol_name" \
|
||||
--replace-fail "const std::string& containing_type" "absl::string_view containing_type"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
Reference in New Issue
Block a user