2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, cmocka }:
|
2019-03-29 15:58:12 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libcbor";
|
2022-02-28 17:14:22 +01:00
|
|
|
version = "0.9.0";
|
2019-03-29 15:58:12 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PJK";
|
|
|
|
repo = pname;
|
2020-10-26 08:17:14 +01:00
|
|
|
rev = "v${version}";
|
2022-02-28 17:14:22 +01:00
|
|
|
sha256 = "sha256-Wp/48yQA17mf/dTgeMcMDvPpKOPkfLhQkCnzgGLpLtk=";
|
2019-03-29 15:58:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
checkInputs = [ cmocka ];
|
|
|
|
|
|
|
|
doCheck = false; # needs "-DWITH_TESTS=ON", but fails w/compilation error
|
|
|
|
|
2020-10-26 08:17:14 +01:00
|
|
|
cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" "-DBUILD_SHARED_LIBS=on" ];
|
2019-03-29 15:58:12 +01:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2019-03-29 15:58:12 +01:00
|
|
|
description = "CBOR protocol implementation for C and others";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/PJK/libcbor";
|
2019-03-29 15:58:12 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dtzWill ];
|
|
|
|
};
|
|
|
|
}
|