python3Packages.jaxlib-build: switch to protobuf 3.20

https://hydra.nixos.org/build/191829110

Changed files
+6 -5
pkgs
development
python-modules
jaxlib
top-level
+5 -5
pkgs/development/python-modules/jaxlib/default.nix
···
, giflib
, grpc
, libjpeg_turbo
+
, protobuf
, python
, snappy
, zlib
···
}:
let
-
inherit (cudaPackages) cudatoolkit cudnn nccl;
pname = "jaxlib";
···
numpy
openssl
pkgs.flatbuffers
-
pkgs.protobuf
+
protobuf
pybind11
scipy
six
···
build --action_env=PYENV_ROOT
build --python_path="${python}/bin/python"
build --distinct_host_configuration=false
-
build --define PROTOBUF_INCLUDE_PATH="${pkgs.protobuf}/include"
+
build --define PROTOBUF_INCLUDE_PATH="${protobuf}/include"
'' + lib.optionalString cudaSupport ''
build --action_env CUDA_TOOLKIT_PATH="${cudatoolkit_joined}"
build --action_env CUDNN_INSTALL_PATH="${cudnn}"
···
sed -i 's@-lprotobuf@-l:libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
sed -i 's@-lprotoc@-l:libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
'' else if stdenv.cc.isClang then ''
-
sed -i 's@-lprotobuf@${pkgs.protobuf}/lib/libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
-
sed -i 's@-lprotoc@${pkgs.protobuf}/lib/libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
+
sed -i 's@-lprotobuf@${protobuf}/lib/libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
+
sed -i 's@-lprotoc@${protobuf}/lib/libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
'' else throw "Unsupported stdenv.cc: ${stdenv.cc}");
installPhase = ''
+1
pkgs/top-level/python-packages.nix
···
# pin to `cudaPackages_11_6` instead.
cudaPackages = pkgs.cudaPackages_11_6;
IOKit = pkgs.darwin.apple_sdk_11_0.IOKit;
+
protobuf = pkgs.protobuf3_20; # jaxlib-build 0.3.15 won't build with protobuf 3.21
};
jaxlib = self.jaxlib-build;