From 4999aeb7b767ef5e6f259ba52b6d2c2743cf9ddc Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 3 Sep 2017 17:20:31 +0300 Subject: [PATCH] python.pkgs.protobuf: fix build --- pkgs/development/python-modules/protobuf.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/protobuf.nix b/pkgs/development/python-modules/protobuf.nix index 44b9ed70a185..4a67a3132eda 100644 --- a/pkgs/development/python-modules/protobuf.nix +++ b/pkgs/development/python-modules/protobuf.nix @@ -8,8 +8,10 @@ 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"; + NIX_CFLAGS_COMPILE = + # work around python distutils compiling C++ with $CC + optional stdenv.isDarwin "-I${libcxx}/include/c++/v1" + ++ optional (versionOlder protobuf.version "2.7.0") "-std=c++98"; propagatedBuildInputs = [ protobuf google_apputils ]; buildInputs = [ google_apputils pyext ];