nixpkgs/pkgs/development/tools/misc/sipp/default.nix

42 lines
921 B
Nix
Raw Normal View History

2017-03-10 09:46:22 +00:00
{stdenv, fetchFromGitHub, autoreconfHook, ncurses, libpcap }:
2015-01-19 14:19:36 +00:00
stdenv.mkDerivation rec {
2017-03-10 09:46:22 +00:00
version = "3.5.1";
2015-01-19 14:19:36 +00:00
pname = "sipp";
2015-01-19 14:19:36 +00:00
2017-03-10 09:46:22 +00:00
src = fetchFromGitHub {
owner = "SIPp";
repo = "sipp";
rev = "v${version}";
sha256 = "179a1fvqyk3jpxbi28l1xfw22cw9vgvxrn19w5f38w74x0jwqg5k";
2015-01-19 14:19:36 +00:00
};
2017-03-10 09:46:22 +00:00
patchPhase = ''
2015-01-19 14:19:36 +00:00
sed -i "s@pcap/\(.*\).pcap@$out/share/pcap/\1.pcap@g" src/scenario.cpp
2017-03-10 09:46:22 +00:00
sed -i -e "s|AC_CHECK_LIB(curses|AC_CHECK_LIB(ncurses|" configure.ac
echo "#define SIPP_VERSION \"v${version}\"" > include/version.h
2015-01-19 14:19:36 +00:00
'';
2017-03-10 09:46:22 +00:00
configureFlags = [
"--with-pcap"
];
2015-01-19 14:19:36 +00:00
postInstall = ''
mkdir -pv $out/share/pcap
cp pcap/* $out/share/pcap
'';
buildInputs = [ncurses libpcap];
2017-03-10 09:46:22 +00:00
nativeBuildInputs = [ autoreconfHook ];
meta = with stdenv.lib; {
homepage = http://sipp.sf.net;
description = "The SIPp testing tool";
license = licenses.gpl3;
platforms = platforms.unix;
};
2015-01-19 14:19:36 +00:00
}