3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix

32 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;
};
}