2017-03-31 01:09:42 +03:00
|
|
|
{ stdenv, fetchFromGitHub, luajit, openssl, perl }:
|
2015-02-06 18:02:54 +03:00
|
|
|
|
2016-08-23 12:39:35 +03:00
|
|
|
stdenv.mkDerivation rec {
|
2015-02-06 18:02:54 +03:00
|
|
|
name = "wrk-${version}";
|
2018-02-28 06:02:45 +03:00
|
|
|
version = "4.1.0";
|
2015-02-06 18:02:54 +03:00
|
|
|
|
2016-08-23 12:39:35 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wg";
|
|
|
|
repo = "wrk";
|
|
|
|
rev = version;
|
2018-02-28 06:02:45 +03:00
|
|
|
sha256 = "0dblb3qdg8mbgb8iiks0g420pza13npbr33b2xkc5dgv7kcwmvqj";
|
2015-02-06 18:02:54 +03:00
|
|
|
};
|
|
|
|
|
2017-03-31 01:09:42 +03:00
|
|
|
buildInputs = [ luajit openssl perl ];
|
|
|
|
|
|
|
|
makeFlags = [ "WITH_LUAJIT=${luajit}" "WITH_OPENSSL=${openssl.dev}" "VER=${version}" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
for f in src/*.h; do
|
|
|
|
substituteInPlace $f \
|
|
|
|
--replace "#include <luajit-2.0/" "#include <"
|
|
|
|
done
|
|
|
|
'';
|
2017-05-02 14:47:36 +03:00
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-DluaL_reg=luaL_Reg" ]; # needed since luajit-2.1.0-beta3
|
2015-06-05 17:15:21 +03:00
|
|
|
|
2015-02-06 18:02:54 +03:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp wrk $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-04-28 11:54:58 +03:00
|
|
|
description = "HTTP benchmarking tool";
|
2017-11-11 00:13:27 +03:00
|
|
|
homepage = https://github.com/wg/wrk;
|
2015-02-06 18:02:54 +03:00
|
|
|
longDescription = ''
|
|
|
|
wrk is a modern HTTP benchmarking tool capable of generating
|
|
|
|
significant load when run on a single multi-core CPU. It
|
|
|
|
combines a multithreaded design with scalable event notification
|
|
|
|
systems such as epoll and kqueue.
|
|
|
|
'';
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ragge ];
|
2017-03-31 01:09:42 +03:00
|
|
|
platforms = platforms.unix;
|
2015-02-06 18:02:54 +03:00
|
|
|
};
|
|
|
|
}
|