From 9ea503fa55763f52b5a750fd440e270fb41326c1 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Mon, 19 Jun 2017 13:24:46 +0200 Subject: [PATCH] python-modules/protobuf: fix darwin build by passing C++ includes explicitly Fixes #26531. Copies the matplotlib solution, as mentioned by @knedlsepp. --- pkgs/development/python-modules/protobuf.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/protobuf.nix b/pkgs/development/python-modules/protobuf.nix index f2f0f5025d1..44b9ed70a18 100644 --- a/pkgs/development/python-modules/protobuf.nix +++ b/pkgs/development/python-modules/protobuf.nix @@ -1,5 +1,5 @@ { stdenv, python, buildPythonPackage -, protobuf, google_apputils, pyext +, protobuf, google_apputils, pyext, libcxx , disabled, doCheck ? true }: with stdenv.lib; @@ -8,6 +8,9 @@ buildPythonPackage rec { inherit (protobuf) name src; inherit disabled doCheck; + # work around python distutils compiling C++ with $CC + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + propagatedBuildInputs = [ protobuf google_apputils ]; buildInputs = [ google_apputils pyext ];