11 stdenv.mkDerivation rec {
15 src = fetchFromGitHub {
19 sha256 = "1jixgb8w97l9gdh3inihz7avz7i770gy2j2irvvlyrq3wi41f5ab";
24 url = "https://src.fedoraproject.org/rpms/rapidjson/raw/48402da9f19d060ffcd40bf2b2e6987212c58b0c/f/rapidjson-1.1.0-c++20.patch";
25 sha256 = "1qm62iad1xfsixv1li7qy475xc7gc04hmi2q21qdk6l69gk7mf82";
28 name = "do-not-include-gtest-src-dir.patch";
29 url = "https://git.alpinelinux.org/aports/plain/community/rapidjson/do-not-include-gtest-src-dir.patch?id=9e5eefc7a5fcf5938a8dc8a3be8c75e9e6809909";
30 hash = "sha256-BjSZEwfCXA/9V+kxQ/2JPWbc26jQn35CfN8+8NW24s4=";
32 # One of these three tests reports memcpy overlap after update to glibc-2.38
33 ./test-skip-valgrind.diff
37 find -name CMakeLists.txt | xargs \
38 sed -i -e "s/-Werror//g" -e "s/-march=native//g"
41 nativeBuildInputs = [ pkg-config cmake ];
43 # for tests, adding gtest to checkInputs does not work
44 # https://github.com/NixOS/nixpkgs/pull/212200
45 buildInputs = [ gtest ];
46 cmakeFlags = [ "-DGTEST_SOURCE_DIR=${gtest.dev}/include" ];
48 nativeCheckInputs = [ valgrind ];
49 doCheck = !stdenv.hostPlatform.isStatic && !stdenv.isDarwin;
52 description = "Fast JSON parser/generator for C++ with both SAX/DOM style API";
53 homepage = "http://rapidjson.org/";
54 license = licenses.mit;
55 platforms = platforms.unix;
56 maintainers = with maintainers; [ dotlambda ];