mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
35 lines
1.2 KiB
Nix
35 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, pkgconfig, zlib, cmake, jemalloc }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "lwan";
|
|
version = "0.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lpereira";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1znkcsbxw3r10prqvf2x27w1wmm9kd485pj59c364wlvqdhidwqr";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
buildInputs = [ jemalloc zlib ];
|
|
|
|
meta = with 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 ];
|
|
};
|
|
}
|