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
|
|
|
}:
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "ntopng";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ntop";
|
|
|
|
repo = "ntopng";
|
2024-02-07 01:22:34 +00:00
|
|
|
rev = "refs/tags/${finalAttrs.version}";
|
|
|
|
hash = "sha256-zLtJ4x1eWtvnd60iNuNkMOX8LinZMEJHSt/Y0FVQ8vw=";
|
2023-07-15 17:15:38 +00:00
|
|
|
fetchSubmodules = true;
|
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/";
|
2024-02-07 01:22:34 +00:00
|
|
|
changelog = "https://github.com/ntop/ntopng/blob/${finalAttrs.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 ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "ntopng";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-02-07 01:22:34 +00:00
|
|
|
})
|