1 { lib, stdenv, fetchFromGitHub, fetchpatch, cmake
4 stdenv.mkDerivation rec {
5 pname = "nlohmann_json";
8 src = fetchFromGitHub {
12 sha256 = "sha256-THordDPdH2qwk6lFTgeFmkl7iDuA/7YH71PTUe6vJCs=";
16 # https://github.com/nlohmann/json/pull/2690
18 url = "https://github.com/nlohmann/json/commit/53a9850eebb88c6ff95f6042d08d5c0cc9d18097.patch";
19 sha256 = "k+Og00nXNg5IsFQY5fWD3xVQQXUFFTie44UXole0S1M=";
23 nativeBuildInputs = [ cmake ];
26 "-DBuildTests=${if doCheck then "ON" else "OFF"}"
27 "-DJSON_MultipleHeaders=ON"
30 # A test cause the build to timeout https://github.com/nlohmann/json/issues/1816
31 #doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
34 postInstall = "rm -rf $out/lib64";
37 description = "Header only C++ library for the JSON file format";
38 homepage = "https://github.com/nlohmann/json";
39 license = licenses.mit;
40 platforms = platforms.all;