Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchurl,
5 makeWrapper,
6 erlang,
7 python3,
8 python3Packages,
9 perlPackages,
10 gnuplot,
11}:
12
13stdenv.mkDerivation rec {
14 pname = "tsung";
15 version = "1.8.0";
16
17 src = fetchurl {
18 url = "http://tsung.erlang-projects.org/dist/tsung-${version}.tar.gz";
19 hash = "sha256-kehkMCYBfj0AiKZxD7EcT2F0d+gm6+TF/lhqpjFH/JI=";
20 };
21
22 nativeBuildInputs = [
23 makeWrapper
24 ];
25
26 propagatedBuildInputs = [
27 erlang
28 gnuplot
29 perlPackages.perl
30 perlPackages.TemplateToolkit
31 python3
32 python3Packages.matplotlib
33 ];
34
35 postFixup = ''
36 # Make tsung_stats.pl accessible
37 # Leaving .pl at the end since all of tsung documentation is refering to it
38 # as tsung_stats.pl
39 ln -s $out/lib/tsung/bin/tsung_stats.pl $out/bin/tsung_stats.pl
40
41 # Add Template Toolkit and gnuplot to tsung_stats.pl
42 wrapProgram $out/bin/tsung_stats.pl \
43 --prefix PATH : ${lib.makeBinPath [ gnuplot ]} \
44 --set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.TemplateToolkit ]}"
45 '';
46
47 meta = {
48 homepage = "http://tsung.erlang-projects.org/";
49 changelog = "https://github.com/processone/tsung/blob/v${version}/CHANGELOG.md";
50 description = "High-performance benchmark framework for various protocols including HTTP, XMPP, LDAP, etc";
51 longDescription = ''
52 Tsung is a distributed load testing tool. It is protocol-independent and
53 can currently be used to stress HTTP, WebDAV, SOAP, PostgreSQL, MySQL,
54 AMQP, MQTT, LDAP and Jabber/XMPP servers.
55 '';
56 license = lib.licenses.gpl2Plus;
57 maintainers = with lib.maintainers; [ uskudnik ];
58 platforms = lib.platforms.unix;
59 };
60}