2019-03-29 14:58:12 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, cmocka }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libcbor";
|
2019-09-04 00:24:45 +01:00
|
|
|
version = "unstable-2019-07-25";
|
2019-03-29 14:58:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PJK";
|
|
|
|
repo = pname;
|
2019-08-22 03:04:37 +01:00
|
|
|
rev = "82512d851205fbc7f65d96a0b4a8e1bad2e4f3c6";
|
|
|
|
sha256 = "01hy7n21gxz4gp3gdwm2ywz822p415bj2k9ccxgwz3plvncs4xa1";
|
2019-03-29 14:58:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
checkInputs = [ cmocka ];
|
|
|
|
|
|
|
|
doCheck = false; # needs "-DWITH_TESTS=ON", but fails w/compilation error
|
|
|
|
|
2020-04-24 13:15:44 +01:00
|
|
|
cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];
|
|
|
|
|
2019-10-30 02:23:29 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-fno-lto";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|