From 61aa366d564e35d8d9d44d4045b536a7fca28930 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 1 Feb 2021 19:13:25 +0100 Subject: [PATCH] cjson: fix build on darwin --- pkgs/development/libraries/cjson/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/cjson/default.nix b/pkgs/development/libraries/cjson/default.nix index 1a5d4b77f6c..b75b91508cb 100644 --- a/pkgs/development/libraries/cjson/default.nix +++ b/pkgs/development/libraries/cjson/default.nix @@ -13,6 +13,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; + # cJSON actually uses C99 standard, not C89 + # https://github.com/DaveGamble/cJSON/issues/275 + postPatch = '' + substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99 + ''; + meta = with lib; { homepage = "https://github.com/DaveGamble/cJSON"; description = "Ultralightweight JSON parser in ANSI C";