Merge pull request #152325 from kmein/feature/libcoap

libcoap: 4.2.1 -> 4.3.0
This commit is contained in:
Ben Siraphob 2021-12-31 20:36:03 +07:00 committed by GitHub
commit e515f4c6a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,16 @@
{ fetchFromGitHub, automake, autoconf, which, pkg-config, libtool, lib, stdenv }:
{ fetchFromGitHub, automake, autoconf, which, pkg-config, libtool, lib, stdenv, gnutls, asciidoc, doxygen
, withTLS ? true
, withDocs ? true
}:
stdenv.mkDerivation rec {
pname = "libcoap";
version = "4.2.1";
version = "4.3.0";
src = fetchFromGitHub {
repo = "libcoap";
owner = "obgm";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "1jkvha52lic13f13hnppizkl80bb2rciayb5hxici0gj6spphgha";
sha256 = "1l031ys833gch600g9g3lvbsr4nysx6glbbj4lwvx3ywl0jr6l9k";
};
nativeBuildInputs = [
automake
@ -15,16 +18,15 @@ stdenv.mkDerivation rec {
which
libtool
pkg-config
];
] ++ lib.optional withTLS gnutls ++ lib.optionals withDocs [ doxygen asciidoc ] ;
preConfigure = "./autogen.sh";
configureFlags = [
"--disable-documentation"
"--disable-shared"
];
configureFlags = [ "--disable-shared" ]
++ lib.optional (!withDocs) "--disable-documentation"
++ lib.optional withTLS "--enable-dtls";
meta = with lib; {
homepage = "https://github.com/obgm/libcoap";
description = "A CoAP (RFC 7252) implementation in C";
platforms = platforms.linux;
platforms = platforms.unix;
license = licenses.bsd2;
maintainers = [ maintainers.kmein ];
};