nixpkgs-suyu/pkgs/tools/networking/tcpreplay/default.nix

36 lines
991 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, libpcap, tcpdump, Carbon, CoreServices }:
stdenv.mkDerivation rec {
pname = "tcpreplay";
version = "4.3.4";
src = fetchurl {
url = "https://github.com/appneta/tcpreplay/releases/download/v${version}/tcpreplay-${version}.tar.gz";
sha256 = "sha256-7gZTEIBsIuL9NvAU4euzMbmKfsTblY6Rw9nL2gZA2Sw=";
};
2020-11-18 07:02:58 +01:00
buildInputs = [ libpcap ]
2021-01-15 10:19:50 +01:00
++ lib.optionals stdenv.hostPlatform.isDarwin [
2020-11-18 07:02:58 +01:00
Carbon CoreServices
];
configureFlags = [
"--disable-local-libopts"
"--disable-libopts-install"
"--enable-dynamic-link"
"--enable-shared"
"--enable-tcpreplay-edit"
"--with-libpcap=${libpcap}"
"--with-tcpdump=${tcpdump}/bin"
];
meta = with lib; {
description = "A suite of utilities for editing and replaying network traffic";
homepage = "https://tcpreplay.appneta.com/";
license = with licenses; [ bsdOriginalUC gpl3Only ];
maintainers = with maintainers; [ eleanor ];
2020-11-18 07:02:58 +01:00
platforms = platforms.unix;
};
}