nixpkgs/pkgs/tools/networking/wrk/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, luajit, openssl, perl }:
2016-08-23 12:39:35 +03:00
stdenv.mkDerivation rec {
pname = "wrk";
2021-12-22 04:26:05 +03:00
version = "4.2.0";
2016-08-23 12:39:35 +03:00
src = fetchFromGitHub {
owner = "wg";
repo = "wrk";
rev = version;
2021-12-22 04:26:05 +03:00
sha256 = "sha256-nCfA444p7krXOB3qRtDKWxWj9tsrDZsGf03ThtE1dXM=";
};
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
'';
env.NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3
2019-10-30 14:34:47 +03:00
installPhase = ''
mkdir -p $out/bin
cp wrk $out/bin
'';
2019-10-30 14:34:47 +03:00
meta = with lib; {
2015-04-28 11:54:58 +03:00
description = "HTTP benchmarking tool";
homepage = "https://github.com/wg/wrk";
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 ];
platforms = platforms.unix;
2024-02-11 05:19:15 +03:00
mainProgram = "wrk";
};
}