summary refs log tree commit diff
path: root/pkgs/servers/http/lwan
diff options
context:
space:
mode:
authorMichiel Leenaars <ml.software@leenaa.rs>2017-12-11 21:53:19 +0000
committerOrivej Desh <orivej@gmx.fr>2017-12-23 23:35:12 +0000
commitcefec62a277cdbb737ada4555d38e921e1d2cf4c (patch)
treeb9dbc6a7695d34c30f592cab24d6fab70f152d31 /pkgs/servers/http/lwan
parentcc8705dcc656663169c9b376c32f3cd1a83a9083 (diff)
downloadnixlib-cefec62a277cdbb737ada4555d38e921e1d2cf4c.tar
nixlib-cefec62a277cdbb737ada4555d38e921e1d2cf4c.tar.gz
nixlib-cefec62a277cdbb737ada4555d38e921e1d2cf4c.tar.bz2
nixlib-cefec62a277cdbb737ada4555d38e921e1d2cf4c.tar.lz
nixlib-cefec62a277cdbb737ada4555d38e921e1d2cf4c.tar.xz
nixlib-cefec62a277cdbb737ada4555d38e921e1d2cf4c.tar.zst
nixlib-cefec62a277cdbb737ada4555d38e921e1d2cf4c.zip
lwan: init at 0.1
Diffstat (limited to 'pkgs/servers/http/lwan')
-rw-r--r--pkgs/servers/http/lwan/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/servers/http/lwan/default.nix b/pkgs/servers/http/lwan/default.nix
new file mode 100644
index 000000000000..878211ebf024
--- /dev/null
+++ b/pkgs/servers/http/lwan/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, pkgconfig, zlib, cmake, jemalloc }:
+
+stdenv.mkDerivation rec {
+  pname = "lwan";
+  version = "0.1";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "lpereira";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1mckryzb06smky0bx2bkqwqzpnq4pb8vlgmmwsvqmwi4mmw9wmi1";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [ jemalloc zlib ];
+
+  meta = with stdenv.lib; {
+    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 ];
+  };
+}