2023-06-22 11:18:40 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gtest
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
2023-07-18 02:52:35 +02:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-06-22 11:18:40 +02:00
|
|
|
pname = "msgpack-c";
|
|
|
|
version = "6.0.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "msgpack";
|
|
|
|
repo = "msgpack-c";
|
2023-07-18 02:52:35 +02:00
|
|
|
rev = "refs/tags/c-${finalAttrs.version}";
|
2023-06-22 11:18:40 +02:00
|
|
|
hash = "sha256-TfC37QKwqvHxsLPgsEqJYkb7mpRQekbntbBPV4v4FO8=";
|
|
|
|
};
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DMSGPACK_BUILD_EXAMPLES=OFF" # examples are not installed even if built
|
2023-11-30 18:50:59 +01:00
|
|
|
] ++ lib.optional (!finalAttrs.finalPackage.doCheck) "-DMSGPACK_BUILD_TESTS=OFF";
|
2023-06-22 11:18:40 +02:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
gtest
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "MessagePack implementation for C";
|
|
|
|
homepage = "https://github.com/msgpack/msgpack-c";
|
2023-07-18 02:52:35 +02:00
|
|
|
changelog = "https://github.com/msgpack/msgpack-c/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
2023-06-22 11:18:40 +02:00
|
|
|
license = licenses.boost;
|
|
|
|
maintainers = with maintainers; [ nickcao ];
|
|
|
|
};
|
2023-07-18 02:52:35 +02:00
|
|
|
})
|