1{ lib, buildPythonPackage, fetchPypi, protobuf, grpcio, setuptools }: 2 3buildPythonPackage rec { 4 pname = "grpcio-tools"; 5 version = "1.59.0"; 6 format = "setuptools"; 7 8 src = fetchPypi { 9 inherit pname version; 10 hash = "sha256-qkAY8thmKsTZgwRF09JToRs+CW6K/iCGVUcTeqEWDpM="; 11 }; 12 13 postPatch = '' 14 substituteInPlace setup.py \ 15 --replace 'protobuf>=4.21.6,<5.0dev' 'protobuf' 16 ''; 17 18 outputs = [ "out" "dev" ]; 19 20 enableParallelBuilding = true; 21 22 propagatedBuildInputs = [ protobuf grpcio setuptools ]; 23 24 # no tests in the package 25 doCheck = false; 26 27 pythonImportsCheck = [ "grpc_tools" ]; 28 29 meta = with lib; { 30 description = "Protobuf code generator for gRPC"; 31 license = licenses.asl20; 32 homepage = "https://grpc.io/grpc/python/"; 33 maintainers = with maintainers; [ ]; 34 }; 35}