caffe: fix build with protobuf 3.18+

+5 -1
+5 -1
pkgs/applications/science/math/caffe/default.nix
··· 91 inherit (python.sourceVersion) major minor; # Should be changed in case of PyPy 92 }); 93 94 - postPatch = lib.optionalString (cudaSupport && lib.versionAtLeast cudatoolkit.version "9.0") '' 95 # CUDA 9.0 doesn't support sm_20 96 sed -i 's,20 21(20) ,,' cmake/Cuda.cmake 97 '';
··· 91 inherit (python.sourceVersion) major minor; # Should be changed in case of PyPy 92 }); 93 94 + postPatch = '' 95 + substituteInPlace src/caffe/util/io.cpp --replace \ 96 + 'SetTotalBytesLimit(kProtoReadBytesLimit, 536870912)' \ 97 + 'SetTotalBytesLimit(kProtoReadBytesLimit)' 98 + '' + lib.optionalString (cudaSupport && lib.versionAtLeast cudatoolkit.version "9.0") '' 99 # CUDA 9.0 doesn't support sm_20 100 sed -i 's,20 21(20) ,,' cmake/Cuda.cmake 101 '';