nixpkgs/pkgs/development/libraries/msgpack-c/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
996 B
Nix
Raw Normal View History

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
] ++ 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
})