Skip to content

Commit d90b1cd

Browse files
committed
python311.protobuf3: fix build by upstream patch
Protobuf 3.22 supports python 3.11 already by including the same patch.
1 parent 0e6f463 commit d90b1cd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

pkgs/development/python-modules/protobuf/default.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ buildPythonPackage {
3333
src = ./use-nixpkgs-abseil-cpp.patch;
3434
abseil_cpp_include_path = "${lib.getDev protobuf.abseil-cpp}/include";
3535
})
36+
]
37+
++ lib.optionals (pythonAtLeast "3.11" && lib.versionOlder protobuf.version "3.22") [
38+
(fetchpatch {
39+
name = "support-python311.patch";
40+
url = "https://github.com/protocolbuffers/protobuf/commit/2206b63c4649cf2e8a06b66c9191c8ef862ca519.diff";
41+
stripLen = 1; # because sourceRoot above
42+
hash = "sha256-3GaoEyZIhS3QONq8LEvJCH5TdO9PKnOgcQF0GlEiwFo=";
43+
})
3644
];
3745

3846
prePatch = ''

0 commit comments

Comments
 (0)