2022-03-31 18:11:26 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, autoreconfHook
|
2022-02-16 17:47:37 +00:00
|
|
|
, zeromq, ndpi, json_c, openssl, libpcap, libcap, curl, libmaxminddb
|
|
|
|
, rrdtool, sqlite, libmysqlclient, expat, net-snmp
|
2014-01-02 16:53:57 +00:00
|
|
|
}:
|
2013-11-05 22:11:57 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-01 18:11:18 +00:00
|
|
|
pname = "ntopng";
|
2022-02-16 17:47:37 +00:00
|
|
|
version = "5.2.1";
|
2014-08-26 09:22:05 +00:00
|
|
|
|
2022-02-16 17:47:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ntop";
|
|
|
|
repo = "ntopng";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-FeRERSq8F3HEelUCkA6pgNNcP94xrWy6EbJgk+cEdqc=";
|
2013-11-05 22:11:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2022-02-16 17:47:37 +00:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/ntop/ntopng/commit/0aa580e1a45f248fffe6d11729ce40571f08e187.patch";
|
|
|
|
sha256 = "sha256-xqEVwfGgkNS+akbJnLZsVvEQdp9GxxUen8VkFomtcPI=";
|
|
|
|
})
|
2013-11-05 22:11:57 +00:00
|
|
|
];
|
|
|
|
|
2022-03-31 18:11:26 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2015-10-28 12:35:09 +00:00
|
|
|
|
2022-02-16 17:47:37 +00:00
|
|
|
buildInputs = [
|
|
|
|
zeromq ndpi json_c openssl libpcap curl libmaxminddb rrdtool sqlite
|
|
|
|
libmysqlclient expat net-snmp libcap
|
|
|
|
];
|
2015-10-28 12:35:09 +00:00
|
|
|
|
2022-02-16 17:47:37 +00:00
|
|
|
autoreconfPhase = "bash autogen.sh";
|
2013-11-05 22:11:57 +00:00
|
|
|
|
2014-08-26 09:22:05 +00:00
|
|
|
preConfigure = ''
|
2015-10-28 12:35:09 +00:00
|
|
|
substituteInPlace Makefile.in --replace "/bin/rm" "rm"
|
2014-08-26 09:22:05 +00:00
|
|
|
'';
|
2013-11-05 22:11:57 +00:00
|
|
|
|
2014-08-26 09:22:05 +00:00
|
|
|
preBuild = ''
|
2022-02-16 17:47:37 +00:00
|
|
|
sed -e "s|\(#define CONST_BIN_DIR \).*|\1\"$out/bin\"|g" \
|
|
|
|
-e "s|\(#define CONST_SHARE_DIR \).*|\1\"$out/share\"|g" \
|
2015-10-28 12:35:09 +00:00
|
|
|
-i include/ntop_defines.h
|
2013-11-05 22:11:57 +00:00
|
|
|
'';
|
|
|
|
|
2022-02-16 17:47:37 +00:00
|
|
|
enableParallelBuilding = true;
|
2018-02-18 13:12:43 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2013-11-05 22:11:57 +00:00
|
|
|
description = "High-speed web-based traffic analysis and flow collection tool";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.ntop.org/products/ntop/";
|
2013-11-05 22:11:57 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2016-05-11 23:33:08 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2013-11-05 22:11:57 +00:00
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|