Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, ncurses, libpcap, cmake, openssl, git, lksctp-tools }:
2
3stdenv.mkDerivation rec {
4 version = "3.6.1";
5 pname = "sipp";
6
7 src = fetchurl {
8 url = "https://github.com/SIPp/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz";
9 sha256 = "sha256-alYOg6/5gvMx3byt+zvVMMWJbNW3V91utoITPMhg7LE=";
10 };
11
12 postPatch = ''
13 cp version.h src/version.h
14 '';
15
16 cmakeFlags = [
17 "-DUSE_GSL=1"
18 "-DUSE_PCAP=1"
19 "-DUSE_SSL=1"
20 "-DUSE_SCTP=${if stdenv.isLinux then "1" else "0"}"
21
22 # file RPATH_CHANGE could not write new RPATH
23 "-DCMAKE_SKIP_BUILD_RPATH=ON"
24 ];
25 enableParallelBuilding = true;
26
27 nativeBuildInputs = [ cmake git ];
28 buildInputs = [ ncurses libpcap openssl ]
29 ++ lib.optional (stdenv.isLinux) lksctp-tools;
30
31 meta = with lib; {
32 homepage = "http://sipp.sf.net";
33 description = "The SIPp testing tool";
34 license = licenses.gpl3;
35 platforms = platforms.unix;
36 };
37}