nixpkgs/pkgs/applications/networking/libcoap/default.nix

34 lines
995 B
Nix
Raw Normal View History

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