nixpkgs/pkgs/development/python-modules/grpcio/default.nix

47 lines
939 B
Nix
Raw Normal View History

{ lib, stdenv
, buildPythonPackage
, grpc
, six
, protobuf
, enum34
, futures
, isPy27
, pkg-config
, cython
, c-ares
, openssl
, zlib
}:
2017-12-20 22:46:51 +00:00
buildPythonPackage rec {
inherit (grpc) src version;
2017-12-20 22:46:51 +00:00
pname = "grpcio";
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cython pkg-config ];
buildInputs = [ c-ares openssl zlib ];
propagatedBuildInputs = [ six protobuf ]
++ lib.optionals (isPy27) [ enum34 futures ];
2017-12-20 22:46:51 +00:00
preBuild = lib.optionalString stdenv.isDarwin "unset AR";
2020-09-13 05:20:00 +01:00
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 lib; {
2017-12-20 22:46:51 +00:00
description = "HTTP/2-based RPC framework";
license = licenses.asl20;
2017-12-20 22:46:51 +00:00
homepage = "https://grpc.io/grpc/python/";
maintainers = with maintainers; [ SuperSandro2000 ];
2017-12-20 22:46:51 +00:00
};
}