mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
6c3855038a
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 3.1.2 with grep in /nix/store/ak7p93w4pkmjvx5fi82fg40rra5z6g44-nlohmann_json-3.1.2 - directory tree listing: https://gist.github.com/cebf8a5968a9c2ae65ec58227044fcad
37 lines
842 B
Nix
37 lines
842 B
Nix
{ stdenv, fetchFromGitHub, cmake
|
|
, hostPlatform
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "nlohmann_json-${version}";
|
|
version = "3.1.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nlohmann";
|
|
repo = "json";
|
|
rev = "v${version}";
|
|
sha256 = "1mpr781fb2dfbyscrr7nil75lkxsazg4wkm749168lcf2ksrrbfi";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
doCheck = true;
|
|
checkTarget = "test";
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
crossAttrs = {
|
|
cmakeFlags = "-DBuildTests=OFF";
|
|
doCheck = false;
|
|
} // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") {
|
|
cmakeFlags = "-DBuildTests=OFF -DCMAKE_SYSTEM_NAME=Windows";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|