summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-08-14 01:10:40 +0200
committerGitHub <noreply@github.com>2018-08-14 01:10:40 +0200
commit4c0e25089e9cf38bc7fa2f65fabd8e276d6b8c9e (patch)
tree00796bc46b817d8d8121ae3d5119ac18f80fc29e /pkgs
parente55eec5208d2d84363f6602bdf72de7703505c5e (diff)
parent4beb94d6d6b7cf1829c27b1fd52d43707fbc1844 (diff)
downloadnixpkgs-4c0e25089e9cf38bc7fa2f65fabd8e276d6b8c9e.tar
nixpkgs-4c0e25089e9cf38bc7fa2f65fabd8e276d6b8c9e.tar.gz
nixpkgs-4c0e25089e9cf38bc7fa2f65fabd8e276d6b8c9e.tar.bz2
nixpkgs-4c0e25089e9cf38bc7fa2f65fabd8e276d6b8c9e.tar.lz
nixpkgs-4c0e25089e9cf38bc7fa2f65fabd8e276d6b8c9e.tar.xz
nixpkgs-4c0e25089e9cf38bc7fa2f65fabd8e276d6b8c9e.tar.zst
nixpkgs-4c0e25089e9cf38bc7fa2f65fabd8e276d6b8c9e.zip
Merge pull request #44902 from danieldk/grpcio-darwin
python/grpcio: fix darwin build
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/grpcio/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/grpcio/default.nix b/pkgs/development/python-modules/grpcio/default.nix
index 1846c7bcd89..204080fe115 100644
--- a/pkgs/development/python-modules/grpcio/default.nix
+++ b/pkgs/development/python-modules/grpcio/default.nix
@@ -1,6 +1,7 @@
-{ stdenv, buildPythonPackage, fetchPypi, lib
-, six, protobuf, enum34, futures, isPy27, isPy34 }:
+{ stdenv, buildPythonPackage, fetchPypi, lib, darwin
+, six, protobuf, enum34, futures, isPy27, isPy34, pkgconfig }:
 
+with stdenv.lib;
 buildPythonPackage rec {
   pname = "grpcio";
   version = "1.13.0";
@@ -10,10 +11,14 @@ buildPythonPackage rec {
     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;