git.iko.soy/typeable/nixpkgs
on master help sign in
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).

commit4beb94d6d6b7cf1829c27b1fd52d43707fbc1844 authorDaniël de Kok <me@danieldk.eu> dateSat 11 Aug 2018, 16:42 (8 years ago) parentc2cf0c5
1 file changed+7−2
pkgs/development/python-modules/grpcio/default.nix+7−2
pkgs/development/python-modules/grpcio/default.nix+7−2
@@ -1,6 +1,7 @@
1−{ stdenv, buildPythonPackage, fetchPypi, lib
2−, six, protobuf, enum34, futures, isPy27, isPy34 }:
1+{ stdenv, buildPythonPackage, fetchPypi, lib, darwin
2+, six, protobuf, enum34, futures, isPy27, isPy34, pkgconfig }:
33
4+with stdenv.lib;
45buildPythonPackage rec {
56 pname = "grpcio";
67 version = "1.13.0";
@@ -10,10 +11,14 @@ buildPythonPackage rec {
1011 sha256 = "6324581e215157f0fbe335dff2e21a65b4406db98ac7cca05f1e23b4f510b426";
1112 };
1213
14+ nativeBuildInputs = [ pkgconfig ] ++ optional stdenv.isDarwin darwin.cctools;
15+
1316 propagatedBuildInputs = [ six protobuf ]
1417 ++ lib.optionals (isPy27 || isPy34) [ enum34 ]
1518 ++ lib.optionals (isPy27) [ futures ];
1619
20+ preBuild = optionalString stdenv.isDarwin "unset AR";
21+
1722 meta = with stdenv.lib; {
1823 description = "HTTP/2-based RPC framework";
1924 license = lib.licenses.asl20;