2019-08-03 21:20:00 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub, darwin
|
|
|
|
, six, protobuf, enum34, futures, isPy27, pkgconfig
|
2019-03-27 18:56:19 +00:00
|
|
|
, cython}:
|
2017-12-20 22:46:51 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "grpcio";
|
2019-08-03 21:20:00 +00:00
|
|
|
version = "1.22.0";
|
2017-12-20 22:46:51 +00:00
|
|
|
|
2019-03-27 18:56:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grpc";
|
|
|
|
repo = "grpc";
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2019-08-03 21:20:00 +00:00
|
|
|
sha256 = "093w8mgvl8ylqlqnfz06ijkmlnkxcjszf9zg6k5ybjw7dwal0jhz";
|
2017-12-20 22:46:51 +00:00
|
|
|
};
|
|
|
|
|
2019-03-27 18:56:19 +00:00
|
|
|
nativeBuildInputs = [ cython pkgconfig ]
|
2019-08-03 21:20:00 +00:00
|
|
|
++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
|
2018-08-11 14:42:43 +00:00
|
|
|
|
2018-04-07 22:04:44 +00:00
|
|
|
propagatedBuildInputs = [ six protobuf ]
|
2019-08-03 21:20:00 +00:00
|
|
|
++ stdenv.lib.optionals (isPy27) [ enum34 futures ];
|
2017-12-20 22:46:51 +00:00
|
|
|
|
2019-08-03 21:20:00 +00:00
|
|
|
preBuild = stdenv.lib.optionalString stdenv.isDarwin "unset AR";
|
2018-08-11 14:42:43 +00:00
|
|
|
|
2017-12-20 22:46:51 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "HTTP/2-based RPC framework";
|
2019-08-03 21:20:00 +00:00
|
|
|
license = licenses.asl20;
|
2017-12-20 22:46:51 +00:00
|
|
|
homepage = "https://grpc.io/grpc/python/";
|
|
|
|
maintainers = with maintainers; [ vanschelven ];
|
|
|
|
};
|
|
|
|
}
|