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

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

74 lines
2 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
2022-03-04 22:37:21 +01:00
, withMysql ? true, libmysqlclient, zlib, numactl
2021-02-13 15:17:33 +01:00
, gnutlsSupport ? false, gnutls
, testers
2022-03-04 22:37:21 +01:00
, pmacct
2021-02-13 15:17:33 +01:00
}:
2019-06-17 22:41:53 +02:00
stdenv.mkDerivation rec {
2023-01-08 10:36:21 +01:00
version = "1.7.8";
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}";
2023-01-08 10:36:21 +01:00
sha256 = "sha256-AcgZ5/8d1U/zGs4QeOkgkZS7ttCW6gtUv/Xuf4O4VE0=";
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
2022-03-04 22:37:21 +01:00
++ lib.optionals withMysql [ libmysqlclient zlib numactl ]
2021-02-13 15:17:33 +01:00
++ 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
2022-03-04 22:37:21 +01:00
passthru.tests = {
version = testers.testVersion { package = pmacct; command = "pmacct -V"; };
2022-03-04 22:37:21 +01: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/";
2022-03-04 22:37:21 +01:00
changelog = "https://github.com/pmacct/pmacct/blob/v${version}/ChangeLog";
2019-06-17 22:41:53 +02:00
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;
};
}