summary refs log tree commit diff
path: root/pkgs/development/libraries/msgpack/generic.nix
blob: 67418b6666d4e8123fafb4d2717bbc770d228f7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, cmake
, version, src, patches ? [ ]
, hostPlatform
, ...
}:

stdenv.mkDerivation rec {
  name = "msgpack-${version}";

  inherit src patches;

  nativeBuildInputs = [ cmake ];

  enableParallelBuilding = true;

  cmakeFlags = []
    ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
                           "-DMSGPACK_BUILD_EXAMPLES=OFF"
    ++ stdenv.lib.optional (hostPlatform.libc == "msvcrt")
                           "-DCMAKE_SYSTEM_NAME=Windows"
    ;

  meta = with stdenv.lib; {
    description = "MessagePack implementation for C and C++";
    homepage    = https://msgpack.org;
    license     = licenses.asl20;
    maintainers = with maintainers; [ redbaron wkennington ];
    platforms   = platforms.all;
  };
}