Files
nixpkgs/pkgs/by-name/vn/vnstat/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

53 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
gd,
ncurses,
sqlite,
check,
}:
stdenv.mkDerivation rec {
pname = "vnstat";
version = "2.13";
src = fetchFromGitHub {
owner = "vergoh";
repo = "vnstat";
rev = "v${version}";
sha256 = "sha256-Xd3s4Wrtfwis0dxRijeWhfloHcXPUNAj0P91uWi1C3M=";
};
postPatch = ''
substituteInPlace src/cfg.c --replace /usr/local $out
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
gd
ncurses
sqlite
];
nativeCheckInputs = [ check ];
doCheck = true;
meta = with lib; {
description = "Console-based network statistics utility for Linux";
longDescription = ''
vnStat is a console-based network traffic monitor for Linux and BSD that
keeps a log of network traffic for the selected interface(s). It uses the
network interface statistics provided by the kernel as information source.
This means that vnStat won't actually be sniffing any traffic and also
ensures light use of system resources.
'';
homepage = "https://humdi.net/vnstat/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ ];
};
}