8 # Optional Dependencies
10 , withJansson ? true, jansson ? null
11 , withNflog ? true, libnetfilter_log ? null
12 , withSQLite ? true, sqlite ? null
13 , withPgSQL ? true, postgresql ? null
14 , withMysql ? true, libmysqlclient ? null }:
16 assert withJansson -> jansson != null;
17 assert withNflog -> libnetfilter_log != null;
18 assert withSQLite -> sqlite != null;
19 assert withPgSQL -> postgresql != null;
20 assert withMysql -> libmysqlclient != null;
22 let inherit (lib) getDev optional optionalString; in
24 stdenv.mkDerivation rec {
28 src = fetchFromGitHub {
32 sha256 = "17p5isrq5w58hvmzhc6akbd37ins3c95g0rvhhdm0v33khzxmran";
35 nativeBuildInputs = [ autoreconfHook pkg-config libtool ];
36 buildInputs = [ libpcap ]
37 ++ optional withJansson jansson
38 ++ optional withNflog libnetfilter_log
39 ++ optional withSQLite sqlite
40 ++ optional withPgSQL postgresql
41 ++ optional withMysql [ libmysqlclient zlib ];
44 optionalString withMysql "${getDev libmysqlclient}/bin/mysql_config";
47 "--with-pcap-includes=${libpcap}/include"
48 ] ++ optional withJansson "--enable-jansson"
49 ++ optional withNflog "--enable-nflog"
50 ++ optional withSQLite "--enable-sqlite3"
51 ++ optional withPgSQL "--enable-pgsql"
52 ++ optional withMysql "--enable-mysql";
55 description = "A small set of multi-purpose passive network monitoring tools";
57 pmacct is a small set of multi-purpose passive network monitoring tools
58 [NetFlow IPFIX sFlow libpcap BGP BMP RPKI IGP Streaming Telemetry]
60 homepage = "http://www.pmacct.net/";
61 license = licenses.gpl2;
62 maintainers = with maintainers; [ _0x4A6F ];
63 platforms = platforms.unix;