2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, buildPythonPackage, darwin, grpc
|
|
|
|
, six, protobuf, enum34, futures, isPy27, pkgconfig
|
2020-05-03 17:38:23 +00:00
|
|
|
, cython, c-ares, openssl, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
inherit (grpc) src version;
|
|
|
|
pname = "grpcio";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cython pkgconfig ]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
buildInputs = [ c-ares openssl zlib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ six protobuf ]
|
|
|
|
++ stdenv.lib.optionals (isPy27) [ enum34 futures ];
|
|
|
|
|
|
|
|
preBuild = stdenv.lib.optionalString stdenv.isDarwin "unset AR";
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;
|
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1;
|
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_CARES = 1;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "HTTP/2-based RPC framework";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://grpc.io/grpc/python/";
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|