summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/grpcio-status/default.nix
blob: a9a545291486f1f1fd952a66b5f1f96ef3477387 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  lib,
  buildPythonPackage,
  fetchPypi,
  googleapis-common-protos,
  grpcio,
  protobuf,
}:

# This package should be updated together with the main grpc package and other
# related python grpc packages.
# nixpkgs-update: no auto update
buildPythonPackage rec {
  pname = "grpcio-status";
  version = "1.76.0";
  format = "setuptools";

  src = fetchPypi {
    pname = "grpcio_status";
    inherit version;
    hash = "sha256-Jfy/7HTBXRoctdo/q47pZyhS3Balqe61uvfXqZUpQ80=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace 'protobuf>=4.21.6' 'protobuf'
  '';

  propagatedBuildInputs = [
    googleapis-common-protos
    grpcio
    protobuf
  ];

  # Project thas no tests
  doCheck = false;

  pythonImportsCheck = [ "grpc_status" ];

  meta = {
    description = "GRPC Python status proto mapping";
    homepage = "https://github.com/grpc/grpc/tree/master/src/python/grpcio_status";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ fab ];
  };
}