Files
nixpkgs/pkgs/by-name/tc/tcpreplay/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

48 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchurl,
libpcap,
tcpdump,
}:
stdenv.mkDerivation rec {
pname = "tcpreplay";
version = "4.5.2";
src = fetchurl {
url = "https://github.com/appneta/tcpreplay/releases/download/v${version}/tcpreplay-${version}.tar.gz";
sha256 = "sha256-zP87spRpoEzMIO0LUY4+Q8Sntah2M52UNb/Z23/l0PE=";
};
buildInputs = [ libpcap ];
# Allow having different prefix for header files (default output
# "out") and libraries ("lib" output)
postPatch = ''
substituteInPlace configure \
--replace-fail 'ls ''${testdir}/$dir/libpcap' 'ls ${lib.getLib libpcap}/$dir/libpcap'
'';
configureFlags = [
"--disable-local-libopts"
"--disable-libopts-install"
"--enable-dynamic-link"
"--enable-shared"
"--enable-tcpreplay-edit"
"--with-libpcap=${libpcap}"
"--with-tcpdump=${tcpdump}/bin/tcpdump"
];
meta = with lib; {
description = "Suite of utilities for editing and replaying network traffic";
homepage = "https://tcpreplay.appneta.com/";
license = with licenses; [
bsdOriginalUC
gpl3Only
];
maintainers = with maintainers; [ eleanor ];
platforms = platforms.unix;
};
}