2969ca571a
GitOrigin-RevId: 257cbbcd3ab7bd96f5d24d50adc807de7c82e06d
48 lines
1,022 B
Nix
48 lines
1,022 B
Nix
{ stdenv
|
|
, buildPythonPackage
|
|
, darwin
|
|
, grpc
|
|
, six
|
|
, protobuf
|
|
, enum34
|
|
, futures
|
|
, isPy27
|
|
, pkg-config
|
|
, cython
|
|
, c-ares
|
|
, openssl
|
|
, zlib
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
inherit (grpc) src version;
|
|
pname = "grpcio";
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
nativeBuildInputs = [ cython pkg-config ]
|
|
++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
|
|
|
|
buildInputs = [ c-ares openssl zlib ];
|
|
propagatedBuildInputs = [ six protobuf ]
|
|
++ stdenv.lib.optionals (isPy27) [ enum34 futures ];
|
|
|
|
preBuild = stdenv.lib.optionalString stdenv.isDarwin "unset AR";
|
|
|
|
GRPC_BUILD_WITH_BORING_SSL_ASM = "";
|
|
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;
|
|
GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1;
|
|
GRPC_PYTHON_BUILD_SYSTEM_CARES = 1;
|
|
|
|
# does not contain any tests
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "grpc" ];
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "HTTP/2-based RPC framework";
|
|
license = licenses.asl20;
|
|
homepage = "https://grpc.io/grpc/python/";
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
};
|
|
}
|