2022-01-03 16:56:52 +00:00
|
|
|
{ fetchFromGitHub, automake, autoconf, which, pkg-config, libtool, lib, stdenv, gnutls, asciidoc, doxygen
|
|
|
|
, withTLS ? true
|
|
|
|
, withDocs ? true
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libcoap";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "4.3.4a";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "libcoap";
|
|
|
|
owner = "obgm";
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-SzuXFn4rihZIHxKSH5waC5362mhsOtBdRatIGI6nv4I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
|
|
automake
|
|
|
|
autoconf
|
|
|
|
which
|
|
|
|
libtool
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2022-01-03 16:56:52 +00:00
|
|
|
] ++ lib.optional withTLS gnutls ++ lib.optionals withDocs [ doxygen asciidoc ] ;
|
2020-04-24 23:36:52 +00:00
|
|
|
preConfigure = "./autogen.sh";
|
2022-01-03 16:56:52 +00:00
|
|
|
configureFlags = [ "--disable-shared" ]
|
|
|
|
++ lib.optional (!withDocs) "--disable-documentation"
|
|
|
|
++ lib.optional withTLS "--enable-dtls";
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/obgm/libcoap";
|
|
|
|
description = "A CoAP (RFC 7252) implementation in C";
|
2022-01-03 16:56:52 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.kmein ];
|
|
|
|
};
|
|
|
|
}
|