1{ stdenv, cmake
2, version, src, patches ? [ ]
3, ...
4}:
5
6stdenv.mkDerivation rec {
7 name = "msgpack-${version}";
8
9 inherit src patches;
10
11 nativeBuildInputs = [ cmake ];
12
13 enableParallelBuilding = true;
14
15 cmakeFlags = []
16 ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
17 "-DMSGPACK_BUILD_EXAMPLES=OFF"
18 ++ stdenv.lib.optional (stdenv.hostPlatform.libc == "msvcrt")
19 "-DCMAKE_SYSTEM_NAME=Windows"
20 ;
21
22 meta = with stdenv.lib; {
23 description = "MessagePack implementation for C and C++";
24 homepage = https://msgpack.org;
25 license = licenses.asl20;
26 maintainers = with maintainers; [ redbaron wkennington ];
27 platforms = platforms.all;
28 };
29}