9 # Optional Dependencies
10 , withJansson ? true, jansson
11 , withNflog ? true, libnetfilter_log
12 , withSQLite ? true, sqlite
13 , withPgSQL ? true, postgresql
14 , withMysql ? true, libmysqlclient, zlib, numactl
15 , gnutlsSupport ? false, gnutls
19 stdenv.mkDerivation (finalAttrs: {
23 src = fetchFromGitHub {
26 rev = "v${finalAttrs.version}";
27 hash = "sha256-3gV6GUhTQnH09NRIJQI0xBn05Bgo3AJsE2cSxNPXITo=";
38 ] ++ lib.optional withJansson jansson
39 ++ lib.optional withNflog libnetfilter_log
40 ++ lib.optional withSQLite sqlite
41 ++ lib.optional withPgSQL postgresql
42 ++ lib.optionals withMysql [ libmysqlclient zlib numactl ]
43 ++ lib.optional gnutlsSupport gnutls;
45 MYSQL_CONFIG = lib.optionalString withMysql "${lib.getDev libmysqlclient}/bin/mysql_config";
48 "--with-pcap-includes=${libpcap}/include"
49 ] ++ lib.optional withJansson "--enable-jansson"
50 ++ lib.optional withNflog "--enable-nflog"
51 ++ lib.optional withSQLite "--enable-sqlite3"
52 ++ lib.optional withPgSQL "--enable-pgsql"
53 ++ lib.optional withMysql "--enable-mysql"
54 ++ lib.optional gnutlsSupport "--enable-gnutls";
57 version = testers.testVersion { package = finalAttrs.finalPackage; command = "pmacct -V"; };
61 description = "Small set of multi-purpose passive network monitoring tools";
63 pmacct is a small set of multi-purpose passive network monitoring tools
64 [NetFlow IPFIX sFlow libpcap BGP BMP RPKI IGP Streaming Telemetry]
66 homepage = "http://www.pmacct.net/";
67 changelog = "https://github.com/pmacct/pmacct/blob/v${version}/ChangeLog";
68 license = licenses.gpl2Plus;
69 maintainers = with maintainers; [ _0x4A6F ];
70 platforms = platforms.unix;