3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix
2018-10-16 21:52:38 -05:00

32 lines
707 B
Nix

{ stdenv, fetchFromGitHub, cmake
}:
stdenv.mkDerivation rec {
name = "nlohmann_json-${version}";
version = "3.3.0";
src = fetchFromGitHub {
owner = "nlohmann";
repo = "json";
rev = "v${version}";
sha256 = "1plg9l1avnjsg6khrd88yj9cbzbbkwzpc5synmicqndb35wndn5h";
};
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;
};
}