protobuf: add version alignment hint

The version is important to match, as long as the default tensorflow
package we consume is a binary wheel that ships with a statically linked
protobuf version.

A mismatch of protobuf versions in a single process can lead to memory
corruption, because of ABI incompatibilities between protobuf versions.
This commit is contained in:
Martin Weinelt
2025-11-18 01:15:24 +01:00
parent 9a1edfaa8e
commit 7f6e1d5d59
+2
View File
@@ -8240,6 +8240,8 @@ with pkgs;
prospector = callPackage ../development/tools/prospector { };
# this version should align with the static protobuf version linked into python3.pkgs.tensorflow
# $ nix-shell -I nixpkgs=$(git rev-parse --show-toplevel) -p python3.pkgs.tensorflow --run "python3 -c 'import google.protobuf; print(google.protobuf.__version__)'"
protobuf = protobuf_32;
inherit