2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gtest
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-07-15 17:15:38 +00:00
|
|
|
pname = "msgpack-c";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "6.0.1";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "msgpack";
|
|
|
|
repo = "msgpack-c";
|
2023-08-04 22:07:22 +00:00
|
|
|
rev = "refs/tags/c-${finalAttrs.version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-BXnK7xNRdZvbSz7tERf/PDJkmxbqAC6trH+h36O/v6k=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2024-05-15 15:35:15 +00:00
|
|
|
(lib.cmakeBool "MSGPACK_BUILD_EXAMPLES" false) # examples are not installed even if built
|
|
|
|
(lib.cmakeBool "MSGPACK_BUILD_TESTS" finalAttrs.finalPackage.doCheck)
|
|
|
|
];
|
2023-07-15 17:15:38 +00: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-08-04 22:07:22 +00:00
|
|
|
changelog = "https://github.com/msgpack/msgpack-c/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.boost;
|
|
|
|
maintainers = with maintainers; [ nickcao ];
|
|
|
|
};
|
2023-08-04 22:07:22 +00:00
|
|
|
})
|