From af86bf34ff2d7a6e31280921461a241f4b043aac Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Fri, 16 Mar 2018 16:05:56 -0400 Subject: [PATCH] rapidjson: fix build on darwin Disables -Werror Alternatively one could use NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" "-Wno-error=zero-as-null-pointer-constant" "-Wno-error=shadow" ]; --- pkgs/development/libraries/rapidjson/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/rapidjson/default.nix b/pkgs/development/libraries/rapidjson/default.nix index 8e6b3b44491..a1671aa3e0f 100644 --- a/pkgs/development/libraries/rapidjson/default.nix +++ b/pkgs/development/libraries/rapidjson/default.nix @@ -13,14 +13,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig cmake ]; - # detected by gcc7 - NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ]; + preConfigure = '' + substituteInPlace CMakeLists.txt --replace "-Werror" "" + substituteInPlace example/CMakeLists.txt --replace "-Werror" "" + ''; meta = with lib; { description = "Fast JSON parser/generator for C++ with both SAX/DOM style API"; homepage = "http://rapidjson.org/"; license = licenses.mit; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = with maintainers; [ cstrahan ]; }; }