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