summary refs log tree commit diff
path: root/pkgs/development/tools/misc/sipp/default.nix
blob: eec1f32b4df84e9197f3373790b22de22d36b4de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{stdenv, fetchurl, ncurses, libpcap }:

stdenv.mkDerivation rec {
  version = "3.6.0";

  pname = "sipp";

  src = fetchurl {
    url = "https://github.com/SIPp/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz";
    sha256 = "1fx1iy2n0m2kr91n1ii30frbscq375k3lqihdgvrqxn0zq8pnzp4";
  };

  postPatch = ''
    sed -i "s@pcap/\(.*\).pcap@$out/share/pcap/\1.pcap@g" src/scenario.cpp
  '';

  configureFlags = [
    "--with-pcap"
  ];

  postInstall = ''
    mkdir -pv $out/share/pcap
    cp pcap/* $out/share/pcap
  '';

  buildInputs = [ncurses libpcap];

  meta = with stdenv.lib; {
    homepage = http://sipp.sf.net;
    description = "The SIPp testing tool";
    license = licenses.gpl3;
    platforms = platforms.unix;
  };
}