3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/grpcio/default.nix
Daniël de Kok 4beb94d6d6 python/grpcio: fix darwin build
grpcio currently does not build on Darwin (10.13.6). Due to the
following issues:

* ar is invoked with incorrect flags (#33765).
* libtool cannot be found, with a libtool dependency, with libtool
  the option '-no_warning_for_no_symbols' is not recognized.
* the module build cannot find boringssl that is packaged with
  python-grpcio when pkgconfig is not installed (grpc/#10058).
2018-08-11 16:47:35 +02:00

29 lines
869 B
Nix

{ stdenv, buildPythonPackage, fetchPypi, lib, darwin
, six, protobuf, enum34, futures, isPy27, isPy34, pkgconfig }:
with stdenv.lib;
buildPythonPackage rec {
pname = "grpcio";
version = "1.13.0";
src = fetchPypi {
inherit pname version;
sha256 = "6324581e215157f0fbe335dff2e21a65b4406db98ac7cca05f1e23b4f510b426";
};
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 ];
};
}