nixpkgs/pkgs/tools/networking/tcpreplay/default.nix
Michal Sojka ae44e695df tcpreplay: fix path to tcpdump
Without this change, running tcpreplay with -v results in:

    Fatal Error: Unable to exec tcpdump: Permission denied

The reason is that tcpreplay tries to execute exactly the path passed
via the --with-tcpdump configure switch.
2021-12-20 08:26:49 +01:00

35 lines
999 B
Nix

{ 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=";
};
buildInputs = [ libpcap ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
Carbon CoreServices
];
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 = "A 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;
};
}