Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 969 B view raw
1{ stdenv, buildPythonPackage, fetchFromGitHub, lib, darwin 2, six, protobuf, enum34, futures, isPy27, isPy34, pkgconfig 3, cython}: 4 5with stdenv.lib; 6buildPythonPackage rec { 7 pname = "grpcio"; 8 version = "1.18.0"; 9 10 src = fetchFromGitHub { 11 owner = "grpc"; 12 repo = "grpc"; 13 rev = "v${version}"; 14 fetchSubmodules = true; 15 sha256 = "0cilbhk35gv46mk40jl5f3iqa94x14qyxbavpfq0kh0rld82nx4m"; 16 }; 17 18 nativeBuildInputs = [ cython pkgconfig ] 19 ++ optional stdenv.isDarwin darwin.cctools; 20 21 propagatedBuildInputs = [ six protobuf ] 22 ++ lib.optionals (isPy27 || isPy34) [ enum34 ] 23 ++ lib.optionals (isPy27) [ futures ]; 24 25 preBuild = optionalString stdenv.isDarwin "unset AR"; 26 27 meta = with stdenv.lib; { 28 description = "HTTP/2-based RPC framework"; 29 license = lib.licenses.asl20; 30 homepage = "https://grpc.io/grpc/python/"; 31 maintainers = with maintainers; [ vanschelven ]; 32 }; 33}