Skip to content
Permalink
Browse files

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 4beb94d)
  • Loading branch information
danieldk authored and matthewbauer committed Aug 11, 2018
1 parent fe792ef commit cb0e20d6db96fe09a501076c7a2c265359982814
Showing with 7 additions and 2 deletions.
  1. +7 −2 pkgs/development/python-modules/grpcio/default.nix
@@ -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;

0 comments on commit cb0e20d

Please sign in to comment.
You can’t perform that action at this time.