31 lines
707 B
Nix
31 lines
707 B
Nix
{ stdenv, fetchFromGitHub, cmake
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "nlohmann_json-${version}";
|
|
version = "3.5.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nlohmann";
|
|
repo = "json";
|
|
rev = "v${version}";
|
|
sha256 = "1jq522d48bvfrxr4f6jnijwx2dwqfb8w9k636j4kxlg1hka27lji";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
cmakeFlags = [
|
|
"-DBuildTests=${if doCheck then "ON" else "OFF"}"
|
|
];
|
|
|
|
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Header only C++ library for the JSON file format";
|
|
homepage = https://github.com/nlohmann/json;
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
};
|
|
}
|