git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #44902 from danieldk/grpcio-darwin

python/grpcio: fix darwin build

commit4c0e25089e9cf38bc7fa2f65fabd8e276d6b8c9e authorDaiderd Jordan <daiderd@gmail.com> dateTue 14 Aug 2018, 01:10 (8 years ago) parente55eec54beb94d
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;