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).

(cherry picked from commit 4beb94d6d6b7cf1829c27b1fd52d43707fbc1844)
release-18.03-flake
Daniël de Kok 2018-08-11 16:42:43 +02:00 committed by Matthew Bauer
parent fe792ef27a
commit cb0e20d6db
1 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,7 @@
{ stdenv, buildPythonPackage, fetchPypi, lib
, six, protobuf3_5, enum34, futures, isPy26, isPy27, isPy34 }:
{ stdenv, buildPythonPackage, fetchPypi, lib, darwin
, six, protobuf3_5, enum34, futures, isPy26, isPy27, isPy34, pkgconfig }:
with stdenv.lib;
buildPythonPackage rec {
pname = "grpcio";
version = "1.9.1";
@ -14,6 +15,10 @@ buildPythonPackage rec {
++ lib.optionals (isPy26 || isPy27 || isPy34) [ enum34 ]
++ lib.optionals (isPy26 || isPy27) [ futures ];
nativeBuildInputs = [ pkgconfig ] ++ optional stdenv.isDarwin darwin.cctools;
preBuild = optionalString stdenv.isDarwin "unset AR";
meta = with stdenv.lib; {
description = "HTTP/2-based RPC framework";
license = lib.licenses.bsd3;