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