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

32 lines
900 B
Nix
Raw Normal View History

{ stdenv, buildPythonPackage, fetchFromGitHub, darwin
, six, protobuf, enum34, futures, isPy27, pkgconfig
, cython}:
2017-12-20 22:46:51 +00:00
buildPythonPackage rec {
pname = "grpcio";
version = "1.22.0";
2017-12-20 22:46:51 +00:00
src = fetchFromGitHub {
owner = "grpc";
repo = "grpc";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "093w8mgvl8ylqlqnfz06ijkmlnkxcjszf9zg6k5ybjw7dwal0jhz";
2017-12-20 22:46:51 +00:00
};
nativeBuildInputs = [ cython pkgconfig ]
++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
propagatedBuildInputs = [ six protobuf ]
++ stdenv.lib.optionals (isPy27) [ enum34 futures ];
2017-12-20 22:46:51 +00:00
preBuild = stdenv.lib.optionalString stdenv.isDarwin "unset AR";
2017-12-20 22:46:51 +00:00
meta = with stdenv.lib; {
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; [ vanschelven ];
};
}