1{ fetchFromGitHub, stdenv, cmake, openssl, zlib, libuv }:
2
3stdenv.mkDerivation rec {
4 name = "libwebsockets-${version}";
5 version = "3.1.0";
6
7 src = fetchFromGitHub {
8 owner = "warmcat";
9 repo = "libwebsockets";
10 rev = "v${version}";
11 sha256 = "1w1wz6snf3cmcpa3f4dci2nz9za2f5rrylxl109id7bcb36xhbdl";
12 };
13
14 buildInputs = [ cmake openssl zlib libuv ];
15 cmakeFlags = [ "-DLWS_WITH_PLUGINS=ON" ];
16
17 meta = {
18 description = "Light, portable C library for websockets";
19 longDescription = ''
20 Libwebsockets is a lightweight pure C library built to
21 use minimal CPU and memory resources, and provide fast
22 throughput in both directions.
23 '';
24 homepage = https://libwebsockets.org;
25 license = stdenv.lib.licenses.lgpl21;
26 platforms = stdenv.lib.platforms.all;
27 };
28}