nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 35 lines 1.0 kB view raw
1{ stdenv, lib, fetchFromGitHub, fetchpatch, pkg-config, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "rapidjson"; 5 version = "1.1.0"; 6 7 src = fetchFromGitHub { 8 owner = "miloyip"; 9 repo = "rapidjson"; 10 rev = "v${version}"; 11 sha256 = "1jixgb8w97l9gdh3inihz7avz7i770gy2j2irvvlyrq3wi41f5ab"; 12 }; 13 14 patches = [ 15 (fetchpatch { 16 url = "https://src.fedoraproject.org/rpms/rapidjson/raw/48402da9f19d060ffcd40bf2b2e6987212c58b0c/f/rapidjson-1.1.0-c++20.patch"; 17 sha256 = "1qm62iad1xfsixv1li7qy475xc7gc04hmi2q21qdk6l69gk7mf82"; 18 }) 19 ]; 20 21 nativeBuildInputs = [ pkg-config cmake ]; 22 23 preConfigure = '' 24 substituteInPlace CMakeLists.txt --replace "-Werror" "" 25 substituteInPlace example/CMakeLists.txt --replace "-Werror" "" 26 ''; 27 28 meta = with lib; { 29 description = "Fast JSON parser/generator for C++ with both SAX/DOM style API"; 30 homepage = "http://rapidjson.org/"; 31 license = licenses.mit; 32 platforms = platforms.unix; 33 maintainers = with maintainers; [ cstrahan ]; 34 }; 35}