summary refs log tree commit diff
path: root/pkgs/applications/networking/tsung/default.nix
blob: a811d7c73edaa3d14385e180c8e0681b75be1fc2 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{ lib
, stdenv
, fetchurl
, makeWrapper
, erlang
, python3
, python3Packages
, perlPackages
, gnuplot
}:

stdenv.mkDerivation rec {
  pname = "tsung";
  version = "1.7.0";

  src = fetchurl {
    url = "http://tsung.erlang-projects.org/dist/tsung-${version}.tar.gz";
    sha256 = "6394445860ef34faedf8c46da95a3cb206bc17301145bc920151107ffa2ce52a";
  };

  nativeBuildInputs = [
    makeWrapper
  ];

  propagatedBuildInputs = [
    erlang
    gnuplot
    perlPackages.perl
    perlPackages.TemplateToolkit
    python3
    python3Packages.matplotlib
  ];


  postFixup = ''
    # Make tsung_stats.pl accessible
    # Leaving .pl at the end since all of tsung documentation is refering to it
    # as tsung_stats.pl
    ln -s $out/lib/tsung/bin/tsung_stats.pl $out/bin/tsung_stats.pl

    # Add Template Toolkit and gnuplot to tsung_stats.pl
    wrapProgram $out/bin/tsung_stats.pl \
        --prefix PATH : ${lib.makeBinPath [ gnuplot ]} \
        --set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.TemplateToolkit ]}"
  '';

  meta = with lib; {
    homepage = "http://tsung.erlang-projects.org/";
    description = "A high-performance benchmark framework for various protocols including HTTP, XMPP, LDAP, etc";
    longDescription = ''
      Tsung is a distributed load testing tool. It is protocol-independent and
      can currently be used to stress HTTP, WebDAV, SOAP, PostgreSQL, MySQL,
      AMQP, MQTT, LDAP and Jabber/XMPP servers.
    '';
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ uskudnik ];
    platforms = platforms.unix;
  };
}