2023-04-12 12:48:02 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, autoreconfHook
|
|
|
|
, curl
|
|
|
|
, expat
|
|
|
|
, fetchFromGitHub
|
|
|
|
, git
|
|
|
|
, json_c
|
|
|
|
, libcap
|
|
|
|
, libmaxminddb
|
|
|
|
, libmysqlclient
|
|
|
|
, libpcap
|
|
|
|
, libsodium
|
|
|
|
, ndpi
|
|
|
|
, net-snmp
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, rdkafka
|
|
|
|
, gtest
|
|
|
|
, rrdtool
|
|
|
|
, hiredis
|
|
|
|
, sqlite
|
|
|
|
, which
|
|
|
|
, zeromq
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "ntopng";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "5.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ntop";
|
|
|
|
repo = "ntopng";
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-iGqrS0AneKYwGMEpbKy9if8bnaEu6aEV+QaH+JrF9xs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace Makefile.in \
|
|
|
|
--replace "/bin/rm" "rm"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
git
|
|
|
|
pkg-config
|
|
|
|
which
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
buildInputs = [
|
2023-04-12 12:48:02 +00:00
|
|
|
curl
|
|
|
|
expat
|
|
|
|
json_c
|
|
|
|
libcap
|
|
|
|
libmaxminddb
|
|
|
|
libmysqlclient
|
|
|
|
libpcap
|
|
|
|
gtest
|
|
|
|
hiredis
|
|
|
|
libsodium
|
|
|
|
net-snmp
|
|
|
|
openssl
|
|
|
|
rdkafka
|
|
|
|
rrdtool
|
|
|
|
sqlite
|
|
|
|
zeromq
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
autoreconfPhase = "bash autogen.sh";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-ndpi-includes=${ndpi}/include/ndpi"
|
|
|
|
"--with-ndpi-static-lib=${ndpi}/lib/"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
2022-02-20 05:27:41 +00:00
|
|
|
sed -e "s|\(#define CONST_BIN_DIR \).*|\1\"$out/bin\"|g" \
|
|
|
|
-e "s|\(#define CONST_SHARE_DIR \).*|\1\"$out/share\"|g" \
|
2020-04-24 23:36:52 +00:00
|
|
|
-i include/ntop_defines.h
|
|
|
|
'';
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "High-speed web-based traffic analysis and flow collection tool";
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://www.ntop.org/products/traffic-analysis/ntop/";
|
|
|
|
changelog = "https://github.com/ntop/ntopng/blob/${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = with maintainers; [ bjornfor ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|