2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, zlib, cmake, jemalloc }:
|
2017-12-11 22:53:19 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lwan";
|
2020-02-01 17:30:18 +01:00
|
|
|
version = "0.3";
|
2017-12-11 22:53:19 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lpereira";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-02-01 17:30:18 +01:00
|
|
|
sha256 = "1znkcsbxw3r10prqvf2x27w1wmm9kd485pj59c364wlvqdhidwqr";
|
2017-12-11 22:53:19 +01:00
|
|
|
};
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2017-12-11 22:53:19 +01:00
|
|
|
|
|
|
|
buildInputs = [ jemalloc zlib ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-12-11 22:53:19 +01:00
|
|
|
description = "Lightweight high-performance multi-threaded web server";
|
|
|
|
longDescription = "A lightweight and speedy web server with a low memory
|
|
|
|
footprint (~500KiB for 10k idle connections), with minimal system calls and
|
|
|
|
memory allocation. Lwan contains a hand-crafted HTTP request parser. Files are
|
|
|
|
served using the most efficient way according to their size: no copies between
|
|
|
|
kernel and userland for files larger than 16KiB. Smaller files are sent using
|
|
|
|
vectored I/O of memory-mapped buffers. Header overhead is considered before
|
|
|
|
compressing small files. Features include: mustache templating engine and IPv6
|
|
|
|
support.
|
|
|
|
";
|
|
|
|
homepage = "https://lwan.ws/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
|
|
|
};
|
|
|
|
}
|