vnstat: modernise package and add choco98 as maintainer

This commit is contained in:
Conor
2026-05-13 21:00:39 +01:00
committed by Conor
parent 5527975e5c
commit 12e5233307

View File

@@ -13,25 +13,30 @@ stdenv.mkDerivation (finalAttrs: {
pname = "vnstat";
version = "2.13";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "vergoh";
repo = "vnstat";
rev = "v${finalAttrs.version}";
sha256 = "sha256-Xd3s4Wrtfwis0dxRijeWhfloHcXPUNAj0P91uWi1C3M=";
tag = "v${finalAttrs.version}";
hash = "sha256-Xd3s4Wrtfwis0dxRijeWhfloHcXPUNAj0P91uWi1C3M=";
};
strictDeps = true;
postPatch = ''
substituteInPlace src/cfg.c --replace /usr/local $out
substituteInPlace src/cfg.c --replace-fail /usr/local $out
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
gd
ncurses
sqlite
];
nativeCheckInputs = [ check ];
checkInputs = [ check ];
doCheck = true;
@@ -44,9 +49,11 @@ stdenv.mkDerivation (finalAttrs: {
This means that vnStat won't actually be sniffing any traffic and also
ensures light use of system resources.
'';
mainProgram = "vnstat";
homepage = "https://humdi.net/vnstat/";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ choco98 ];
platforms = lib.platforms.linux;
maintainers = [ ];
sourceProvenance = with lib.sourceTypes; [ fromSource ];
};
})