1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 googleapis-common-protos,
6 grpcio,
7 protobuf,
8 pythonOlder,
9}:
10
11# This package should be updated together with the main grpc package and other
12# related python grpc packages.
13# nixpkgs-update: no auto update
14buildPythonPackage rec {
15 pname = "grpcio-status";
16 version = "1.74.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchPypi {
22 pname = "grpcio_status";
23 inherit version;
24 hash = "sha256-xYwbJKpFTjDx/Gp+DbvBlMVKQIFDlxqUtfTkC7WDFDI=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace 'protobuf>=4.21.6' 'protobuf'
30 '';
31
32 propagatedBuildInputs = [
33 googleapis-common-protos
34 grpcio
35 protobuf
36 ];
37
38 # Project thas no tests
39 doCheck = false;
40
41 pythonImportsCheck = [ "grpc_status" ];
42
43 meta = with lib; {
44 description = "GRPC Python status proto mapping";
45 homepage = "https://github.com/grpc/grpc/tree/master/src/python/grpcio_status";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ fab ];
48 };
49}