2018-08-11 15:42:43 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, lib, darwin
|
|
|
|
, six, protobuf, enum34, futures, isPy27, isPy34, pkgconfig }:
|
2017-12-20 22:46:51 +00:00
|
|
|
|
2018-08-11 15:42:43 +01:00
|
|
|
with stdenv.lib;
|
2017-12-20 22:46:51 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "grpcio";
|
2019-02-14 07:37:17 +00:00
|
|
|
version = "1.18.0";
|
2017-12-20 22:46:51 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-02-14 07:37:17 +00:00
|
|
|
sha256 = "abe825aa49e6239d5edf4e222c44170d2c7f6f4b1fd5286b4756a62d8067e112";
|
2017-12-20 22:46:51 +00:00
|
|
|
};
|
|
|
|
|
2018-08-11 15:42:43 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ] ++ optional stdenv.isDarwin darwin.cctools;
|
|
|
|
|
2018-04-07 23:04:44 +01:00
|
|
|
propagatedBuildInputs = [ six protobuf ]
|
2018-06-25 09:50:44 +01:00
|
|
|
++ lib.optionals (isPy27 || isPy34) [ enum34 ]
|
|
|
|
++ lib.optionals (isPy27) [ futures ];
|
2017-12-20 22:46:51 +00:00
|
|
|
|
2018-08-11 15:42:43 +01:00
|
|
|
preBuild = optionalString stdenv.isDarwin "unset AR";
|
|
|
|
|
2017-12-20 22:46:51 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "HTTP/2-based RPC framework";
|
2018-07-03 22:07:43 +01:00
|
|
|
license = lib.licenses.asl20;
|
2017-12-20 22:46:51 +00:00
|
|
|
homepage = "https://grpc.io/grpc/python/";
|
|
|
|
maintainers = with maintainers; [ vanschelven ];
|
|
|
|
};
|
|
|
|
}
|