mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
96 lines
1.7 KiB
Nix
96 lines
1.7 KiB
Nix
{
|
|
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,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "ntopng";
|
|
version = "6.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ntop";
|
|
repo = "ntopng";
|
|
rev = "refs/tags/${finalAttrs.version}";
|
|
hash = "sha256-8PG18mOV/6EcBpKt9kLyI40OLDnpnc2b4IUu9JbK/Co=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
preConfigure = ''
|
|
substituteInPlace Makefile.in \
|
|
--replace "/bin/rm" "rm"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
git
|
|
pkg-config
|
|
which
|
|
];
|
|
|
|
buildInputs = [
|
|
curl
|
|
expat
|
|
json_c
|
|
libcap
|
|
libmaxminddb
|
|
libmysqlclient
|
|
libpcap
|
|
gtest
|
|
hiredis
|
|
libsodium
|
|
net-snmp
|
|
openssl
|
|
rdkafka
|
|
rrdtool
|
|
sqlite
|
|
zeromq
|
|
];
|
|
|
|
autoreconfPhase = "bash autogen.sh";
|
|
|
|
configureFlags = [
|
|
"--with-ndpi-includes=${ndpi}/include/ndpi"
|
|
"--with-ndpi-static-lib=${ndpi}/lib/"
|
|
];
|
|
|
|
preBuild = ''
|
|
sed -e "s|\(#define CONST_BIN_DIR \).*|\1\"$out/bin\"|g" \
|
|
-e "s|\(#define CONST_SHARE_DIR \).*|\1\"$out/share\"|g" \
|
|
-i include/ntop_defines.h
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with lib; {
|
|
description = "High-speed web-based traffic analysis and flow collection tool";
|
|
homepage = "https://www.ntop.org/products/traffic-analysis/ntop/";
|
|
changelog = "https://github.com/ntop/ntopng/blob/${finalAttrs.version}/CHANGELOG.md";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
maintainers = with maintainers; [ bjornfor ];
|
|
mainProgram = "ntopng";
|
|
};
|
|
})
|