nixpkgs/pkgs/by-name/bn/bngblaster/package.nix
2024-04-22 10:30:16 +02:00

51 lines
1.0 KiB
Nix

{
lib,
stdenv,
cmake,
cmocka,
fetchFromGitHub,
jansson,
libdict,
libpcap,
ncurses,
openssl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bngblaster";
version = "0.8.47";
src = fetchFromGitHub {
owner = "rtbrick";
repo = "bngblaster";
rev = finalAttrs.version;
hash = "sha256-ad2vVBXN5hUCaFnq4WYc7UTKvyLg4HY+l+PGlc5ylmw=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
libdict
ncurses
jansson
openssl
cmocka
] ++ lib.optionals finalAttrs.doCheck [ libpcap ];
cmakeFlags = [
"-DBNGBLASTER_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
"-DBNGBLASTER_VERSION=${finalAttrs.version}"
];
doCheck = true;
meta = with lib; {
description = "Network tester for access and routing protocols";
homepage = "https://github.com/rtbrick/bngblaster/";
changelog = "https://github.com/rtbrick/bngblaster/releases/tag/${finalAttrs.version}";
license = licenses.bsd3;
maintainers = teams.wdz.members;
badPlatforms = platforms.darwin;
};
})