2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2021-01-05 12:33:26 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, grpc
|
|
|
|
, six
|
|
|
|
, protobuf
|
2021-03-24 16:45:56 +00:00
|
|
|
, enum34 ? null
|
|
|
|
, futures ? null
|
2021-01-05 12:33:26 +00:00
|
|
|
, isPy27
|
|
|
|
, pkg-config
|
|
|
|
, 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";
|
|
|
|
|
2020-11-08 23:07:47 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-02-28 06:16:38 +00:00
|
|
|
nativeBuildInputs = [ cython pkg-config ];
|
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 ]
|
2021-01-24 00:29:22 +00:00
|
|
|
++ lib.optionals (isPy27) [ enum34 futures ];
|
2017-12-20 22:46:51 +00:00
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
preBuild = 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;
|
|
|
|
|
2021-01-05 12:33:26 +00:00
|
|
|
# does not contain any tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "grpc" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-12-20 22:46:51 +00:00
|
|
|
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/";
|
2021-01-05 12:33:26 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2017-12-20 22:46:51 +00:00
|
|
|
};
|
|
|
|
}
|