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