nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 protobuf,
6 cython,
7 grpcio,
8 setuptools,
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-tools";
16 version = "1.78.0";
17 pyproject = true;
18
19 src = fetchPypi {
20 pname = "grpcio_tools";
21 inherit version;
22 hash = "sha256-Sw3YZWAnQxbhVdklFYJ2+FZFCBkwiLxD4g0/Xf+Vays=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace-fail "Cython==3.1.1" Cython
28 '';
29
30 outputs = [
31 "out"
32 "dev"
33 ];
34
35 enableParallelBuilding = true;
36
37 build-system = [
38 cython
39 setuptools
40 ];
41
42 pythonRelaxDeps = [
43 "protobuf"
44 "grpcio"
45 ];
46
47 dependencies = [
48 protobuf
49 grpcio
50 setuptools
51 ];
52
53 # no tests in the package
54 doCheck = false;
55
56 pythonImportsCheck = [ "grpc_tools" ];
57
58 meta = {
59 description = "Protobuf code generator for gRPC";
60 license = lib.licenses.asl20;
61 homepage = "https://grpc.io/grpc/python/";
62 maintainers = [ ];
63 };
64}