nixpkgs-suyu/pkgs/tools/networking/pmacct/default.nix

67 lines
1.8 KiB
Nix
Raw Normal View History

2021-02-13 15:17:33 +01:00
{ lib
, stdenv
2019-06-17 22:41:53 +02:00
, fetchFromGitHub
2021-01-17 04:51:22 +01:00
, pkg-config
2019-06-17 22:41:53 +02:00
, autoreconfHook
, libtool
, libpcap
2021-02-13 15:17:33 +01:00
, libcdada
2019-06-17 22:41:53 +02:00
# Optional Dependencies
2021-02-13 15:17:33 +01:00
, withJansson ? true, jansson
, withNflog ? true, libnetfilter_log
, withSQLite ? true, sqlite
, withPgSQL ? true, postgresql
, withMysql ? true, libmysqlclient, zlib
, gnutlsSupport ? false, gnutls
}:
2019-06-17 22:41:53 +02:00
stdenv.mkDerivation rec {
2021-02-13 15:17:33 +01:00
version = "1.7.6";
2019-06-17 22:41:53 +02:00
pname = "pmacct";
src = fetchFromGitHub {
owner = "pmacct";
2021-02-13 15:17:33 +01:00
repo = "pmacct";
2019-06-17 22:41:53 +02:00
rev = "v${version}";
2021-02-13 15:17:33 +01:00
sha256 = "0x1i75hwz44siqvn4i58jgji0zwrqgn6ayv89s9m9nh3b423nsiv";
2019-06-17 22:41:53 +02:00
};
2021-02-13 15:17:33 +01:00
nativeBuildInputs = [
autoreconfHook
pkg-config
libtool
];
buildInputs = [
libcdada
libpcap
] ++ lib.optional withJansson jansson
++ lib.optional withNflog libnetfilter_log
++ lib.optional withSQLite sqlite
++ lib.optional withPgSQL postgresql
++ lib.optionals withMysql [ libmysqlclient zlib ]
++ lib.optional gnutlsSupport gnutls;
2019-06-17 22:41:53 +02:00
2021-02-13 15:17:33 +01:00
MYSQL_CONFIG = lib.optionalString withMysql "${lib.getDev libmysqlclient}/bin/mysql_config";
2020-09-12 13:09:52 +02:00
2019-06-17 22:41:53 +02:00
configureFlags = [
"--with-pcap-includes=${libpcap}/include"
2021-02-13 15:17:33 +01:00
] ++ lib.optional withJansson "--enable-jansson"
++ lib.optional withNflog "--enable-nflog"
++ lib.optional withSQLite "--enable-sqlite3"
++ lib.optional withPgSQL "--enable-pgsql"
++ lib.optional withMysql "--enable-mysql"
++ lib.optional gnutlsSupport "--enable-gnutls";
2019-06-17 22:41:53 +02:00
meta = with lib; {
description = "A small set of multi-purpose passive network monitoring tools";
2019-06-17 22:41:53 +02:00
longDescription = ''
pmacct is a small set of multi-purpose passive network monitoring tools
[NetFlow IPFIX sFlow libpcap BGP BMP RPKI IGP Streaming Telemetry]
'';
homepage = "http://www.pmacct.net/";
license = licenses.gpl2;
2020-07-29 12:49:07 +02:00
maintainers = with maintainers; [ _0x4A6F ];
2019-06-17 22:41:53 +02:00
platforms = platforms.unix;
};
}