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