git.iko.soy/typeable/nixpkgs
on master help sign in
pmacct: init at 1.7.3
commitbff385eab30595aa8813f848d1b605404883198b author0x4A6F <0x4A6F@users.noreply.github.com> dateMon 17 Jun 2019, 20:41 (7 years ago) parent2e52f98
2 files changed+64
pkgs/tools/networking/pmacct/default.nix+62 pkgs/top-level/all-packages.nix+2
pkgs/tools/networking/pmacct/default.nixnew file+62
@@ -0,0 +1,62 @@
1+{ stdenv
2+, fetchFromGitHub
3+, pkgconfig
4+, autoreconfHook
5+, libtool
6+, libpcap
7+
8+# Optional Dependencies
9+, zlib ? null
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 }:
15+
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;
21+
22+let inherit (stdenv.lib) optional; in
23+
24+stdenv.mkDerivation rec {
25+ version = "1.7.3";
26+ pname = "pmacct";
27+
28+ src = fetchFromGitHub {
29+ owner = "pmacct";
30+ repo = pname;
31+ rev = "v${version}";
32+ sha256 = "0j5qmkya67q7jvaddcj00blmaac37bkir1zb3m1xmm95gm5lf2p5";
33+ };
34+
35+ nativeBuildInputs = [ autoreconfHook pkgconfig 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 ];
42+
43+ configureFlags = [
44+ "--with-pcap-includes=${libpcap}/include"
45+ ] ++ optional withJansson "--enable-jansson"
46+ ++ optional withNflog "--enable-nflog"
47+ ++ optional withSQLite "--enable-sqlite3"
48+ ++ optional withPgSQL "--enable-pgsql"
49+ ++ optional withMysql "--enable-mysql";
50+
51+ meta = with stdenv.lib; {
52+ description = "pmacct is a small set of multi-purpose passive network monitoring tools";
53+ longDescription = ''
54+ pmacct is a small set of multi-purpose passive network monitoring tools
55+ [NetFlow IPFIX sFlow libpcap BGP BMP RPKI IGP Streaming Telemetry]
56+ '';
57+ homepage = "http://www.pmacct.net/";
58+ license = licenses.gpl2;
59+ maintainers = with maintainers; [ "0x4A6F" ];
60+ platforms = platforms.unix;
61+ };
62+}
pkgs/top-level/all-packages.nix+2
@@ -5743,6 +5743,8 @@ in
57435743
57445744 pastebinit = callPackage ../tools/misc/pastebinit { };
57455745
5746+ pmacct = callPackage ../tools/networking/pmacct { };
5747+
57465748 polygraph = callPackage ../tools/networking/polygraph { };
57475749
57485750 progress = callPackage ../tools/misc/progress { };