@@ -1,15 +1,19 @@
1−{ fetchgit, stdenv, cmake, openssl, zlib }:
1+{ fetchFromGitHub, stdenv, cmake, openssl, zlib, libuv }:
22
33stdenv.mkDerivation rec {
4− name = "libwebsockets-1.4";
4+ name = "libwebsockets-${version}";
5+ version = "2.3.0";
56
6− src = fetchgit {
7− url = "git://git.libwebsockets.org/libwebsockets";
8− rev = "16fb0132cec0fcced29bce6d86eaf94a9beb9785";
9− sha256 = "0gk4dgx125nz7wl59bx0kgxxg261r9kyxvdff5ld98slr9f08d0l";
7+ src = fetchFromGitHub {
8+ owner = "warmcat";
9+ repo = "libwebsockets";
10+ rev = "v${version}";
11+ sha256 = "1hv2b5r6sg42xnqhm4ysjvyiz3cqpfmwaqm33vpbx0k7arj4ixvy";
1012 };
1113
1214 buildInputs = [ cmake openssl zlib ];
15+ propagatedBuildInputs = [ libuv ];
16+ cmakeFlags = [ "-DLWS_WITH_PLUGINS=ON" ];
1317
1418 meta = {
1519 description = "Light, portable C library for websockets";
@@ -19,8 +23,7 @@ stdenv.mkDerivation rec {
1923 throughput in both directions.
2024 '';
2125 homepage = https://libwebsockets.org/trac/libwebsockets;
22− # See http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/tree/LICENSE
23− license = stdenv.lib.licenses.gpl2Plus;
26+ license = stdenv.lib.licenses.lgpl;
2427 maintainers = [ ];
2528 platforms = stdenv.lib.platforms.all;
2629 };