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";
|
|
|
|
version = "6.0.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "msgpack";
|
|
|
|
repo = "msgpack-c";
|
2023-08-04 22:07:22 +00:00
|
|
|
rev = "refs/tags/c-${finalAttrs.version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-TfC37QKwqvHxsLPgsEqJYkb7mpRQekbntbBPV4v4FO8=";
|
|
|
|
};
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DMSGPACK_BUILD_EXAMPLES=OFF" # examples are not installed even if built
|
2024-01-02 11:29:13 +00:00
|
|
|
] ++ lib.optional (!finalAttrs.finalPackage.doCheck) "-DMSGPACK_BUILD_TESTS=OFF";
|
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
|
|
|
})
|