3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/grpcio/default.nix
2018-11-27 12:02:55 -05:00

29 lines
857 B
Nix

{ stdenv, buildPythonPackage, fetchPypi, lib, darwin
, six, protobuf, enum34, futures, isPy27, isPy34, pkgconfig }:
with stdenv.lib;
buildPythonPackage rec {
pname = "grpcio";
version = "1.16.1";
src = fetchPypi {
inherit pname version;
sha256 = "0am76f8r4v5kcvbar593n2c1mp25cxi67cxigjhd0rnncmk4bgs1";
};
nativeBuildInputs = [ pkgconfig ] ++ optional stdenv.isDarwin darwin.cctools;
propagatedBuildInputs = [ six protobuf ]
++ lib.optionals (isPy27 || isPy34) [ enum34 ]
++ lib.optionals (isPy27) [ futures ];
preBuild = optionalString stdenv.isDarwin "unset AR";
meta = with stdenv.lib; {
description = "HTTP/2-based RPC framework";
license = lib.licenses.asl20;
homepage = "https://grpc.io/grpc/python/";
maintainers = with maintainers; [ vanschelven ];
};
}