python311.protobuf3: fix build by upstream patch

Protobuf 3.22 supports python 3.11 already by including the same patch.
This commit is contained in:
Vladimír Čunát 2023-08-19 10:40:28 +02:00
parent 0e6f4634b6
commit d90b1cd83c
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -33,6 +33,14 @@ buildPythonPackage {
src = ./use-nixpkgs-abseil-cpp.patch;
abseil_cpp_include_path = "${lib.getDev protobuf.abseil-cpp}/include";
})
]
++ lib.optionals (pythonAtLeast "3.11" && lib.versionOlder protobuf.version "3.22") [
(fetchpatch {
name = "support-python311.patch";
url = "https://github.com/protocolbuffers/protobuf/commit/2206b63c4649cf2e8a06b66c9191c8ef862ca519.diff";
stripLen = 1; # because sourceRoot above
hash = "sha256-3GaoEyZIhS3QONq8LEvJCH5TdO9PKnOgcQF0GlEiwFo=";
})
];
prePatch = ''