2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2021-01-09 10:05:03 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, darwin
|
|
|
|
, grpc
|
|
|
|
, six
|
|
|
|
, protobuf
|
|
|
|
, enum34
|
|
|
|
, futures
|
|
|
|
, isPy27
|
|
|
|
, pkg-config
|
|
|
|
, cython
|
|
|
|
, c-ares
|
|
|
|
, openssl
|
|
|
|
, zlib
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
inherit (grpc) src version;
|
|
|
|
pname = "grpcio";
|
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
nativeBuildInputs = [ cython pkg-config ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional stdenv.isDarwin darwin.cctools;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
buildInputs = [ c-ares openssl zlib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ six protobuf ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optionals (isPy27) [ enum34 futures ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
preBuild = lib.optionalString stdenv.isDarwin "unset AR";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
GRPC_BUILD_WITH_BORING_SSL_ASM = "";
|
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;
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
# does not contain any tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "grpc" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "HTTP/2-based RPC framework";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://grpc.io/grpc/python/";
|
2021-01-09 10:05:03 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|