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