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