1 { stdenv, lib, fetchFromGitHub, cmake }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-sdhnDpaAO9Fau4uMzNXrbOJ2k0b8+MdhKh6rpFMUwaQ=";
14 nativeBuildInputs = [ cmake ];
16 # cJSON actually uses C99 standard, not C89
17 # https://github.com/DaveGamble/cJSON/issues/275
19 substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99
23 homepage = "https://github.com/DaveGamble/cJSON";
24 description = "Ultralightweight JSON parser in ANSI C";
25 license = licenses.mit;
26 maintainers = [ maintainers.matthiasbeyer ];
27 platforms = platforms.unix;