16 buildPythonPackage rec {
17 inherit (grpc) src version;
19 format = "setuptools";
21 outputs = [ "out" "dev" ];
23 nativeBuildInputs = [ cython pkg-config ];
25 buildInputs = [ c-ares openssl zlib ];
26 propagatedBuildInputs = [ six protobuf ]
27 ++ lib.optionals (isPy27) [ enum34 futures ];
30 export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$NIX_BUILD_CORES"
31 if [ -z "$enableParallelBuilding" ]; then
32 GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS=1
34 '' + lib.optionalString stdenv.isDarwin ''
38 GRPC_BUILD_WITH_BORING_SSL_ASM = "";
39 GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;
40 GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1;
41 GRPC_PYTHON_BUILD_SYSTEM_CARES = 1;
43 # does not contain any tests
46 enableParallelBuilding = true;
48 pythonImportsCheck = [ "grpc" ];
51 description = "HTTP/2-based RPC framework";
52 license = licenses.asl20;
53 homepage = "https://grpc.io/grpc/python/";
54 maintainers = with maintainers; [ ];