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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
995 B
Nix
Raw Normal View History

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