nixpkgs/pkgs/by-name/ms/msgpack-c/package.nix

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

46 lines
1007 B
Nix
Raw Normal View History

2023-06-22 09:18:40 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gtest
, zlib
}:
2023-07-18 00:52:35 +00:00
stdenv.mkDerivation (finalAttrs: {
2023-06-22 09:18:40 +00:00
pname = "msgpack-c";
version = "6.1.0";
2023-06-22 09:18:40 +00:00
src = fetchFromGitHub {
owner = "msgpack";
repo = "msgpack-c";
2023-07-18 00:52:35 +00:00
rev = "refs/tags/c-${finalAttrs.version}";
hash = "sha256-yL1+6w9l1Ccgrh8WXqvHv2yrb9QH+TrHIAFLXGoVuT0=";
2023-06-22 09:18:40 +00:00
};
strictDeps = true;
nativeBuildInputs = [
cmake
];
cmakeFlags = [
(lib.cmakeBool "MSGPACK_BUILD_EXAMPLES" false) # examples are not installed even if built
(lib.cmakeBool "MSGPACK_BUILD_TESTS" finalAttrs.finalPackage.doCheck)
];
2023-06-22 09:18:40 +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-07-18 00:52:35 +00:00
changelog = "https://github.com/msgpack/msgpack-c/blob/${finalAttrs.src.rev}/CHANGELOG.md";
2023-06-22 09:18:40 +00:00
license = licenses.boost;
maintainers = with maintainers; [ nickcao ];
};
2023-07-18 00:52:35 +00:00
})