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

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

48 lines
1,014 B
Nix
Raw Normal View History

2023-06-22 11:21:05 +02:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, boost
, zlib
}:
2023-07-18 02:53:24 +02:00
stdenv.mkDerivation (finalAttrs: {
2023-06-22 11:21:05 +02:00
pname = "msgpack-cxx";
version = "6.1.0";
2023-06-22 11:21:05 +02:00
src = fetchFromGitHub {
owner = "msgpack";
repo = "msgpack-c";
2023-07-18 02:53:24 +02:00
rev = "refs/tags/cpp-${finalAttrs.version}";
hash = "sha256-VqzFmm3MmMhWyooOsz1d9gwwbn/fnnxpkCFwqKR6los=";
2023-06-22 11:21:05 +02:00
};
strictDeps = true;
nativeBuildInputs = [
cmake
];
buildInputs = [
boost
];
cmakeFlags = [
"-DMSGPACK_BUILD_DOCS=OFF" # docs are not installed even if built
] ++ lib.optional finalAttrs.finalPackage.doCheck "-DMSGPACK_BUILD_TESTS=ON";
2023-06-22 11:21:05 +02:00
checkInputs = [
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:53:24 +02:00
changelog = "https://github.com/msgpack/msgpack-c/blob/${finalAttrs.src.rev}/CHANGELOG.md";
2023-06-22 11:21:05 +02:00
license = licenses.boost;
maintainers = with maintainers; [ nickcao ];
};
2023-07-18 02:53:24 +02:00
})