2019-10-19 01:31:34 +01:00
|
|
|
{ stdenv, buildPythonPackage, darwin, grpc
|
2019-08-03 22:20:00 +01:00
|
|
|
, six, protobuf, enum34, futures, isPy27, pkgconfig
|
2020-04-14 16:50:45 +01:00
|
|
|
, cython, c-ares, openssl, zlib }:
|
2017-12-20 22:46:51 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2019-10-19 01:31:34 +01:00
|
|
|
inherit (grpc) src version;
|
2017-12-20 22:46:51 +00:00
|
|
|
pname = "grpcio";
|
|
|
|
|
2019-03-27 18:56:19 +00:00
|
|
|
nativeBuildInputs = [ cython pkgconfig ]
|
2019-08-03 22:20:00 +01:00
|
|
|
++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
|
2018-08-11 15:42:43 +01:00
|
|
|
|
2020-04-14 16:50:45 +01:00
|
|
|
buildInputs = [ c-ares openssl zlib ];
|
2018-04-07 23:04:44 +01:00
|
|
|
propagatedBuildInputs = [ six protobuf ]
|
2019-08-03 22:20:00 +01:00
|
|
|
++ stdenv.lib.optionals (isPy27) [ enum34 futures ];
|
2017-12-20 22:46:51 +00:00
|
|
|
|
2019-08-03 22:20:00 +01:00
|
|
|
preBuild = stdenv.lib.optionalString stdenv.isDarwin "unset AR";
|
2018-08-11 15:42:43 +01:00
|
|
|
|
2020-09-13 05:20:00 +01:00
|
|
|
GRPC_BUILD_WITH_BORING_SSL_ASM = "";
|
2020-04-14 16:50:45 +01:00
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;
|
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1;
|
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_CARES = 1;
|
|
|
|
|
2017-12-20 22:46:51 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "HTTP/2-based RPC framework";
|
2019-08-03 22:20:00 +01:00
|
|
|
license = licenses.asl20;
|
2017-12-20 22:46:51 +00:00
|
|
|
homepage = "https://grpc.io/grpc/python/";
|
2020-02-26 14:21:43 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-12-20 22:46:51 +00:00
|
|
|
};
|
|
|
|
}
|