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