3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libwebsockets/default.nix

52 lines
1.3 KiB
Nix
Raw Normal View History

2017-09-19 14:38:39 +01:00
{ fetchFromGitHub, stdenv, cmake, openssl, zlib, libuv }:
2015-09-13 19:49:13 +01:00
2019-09-16 05:28:30 +01:00
let
generic = { version, sha256 }: stdenv.mkDerivation rec {
pname = "libwebsockets";
inherit version;
src = fetchFromGitHub {
owner = "warmcat";
repo = "libwebsockets";
rev = "v${version}";
inherit sha256;
};
buildInputs = [ openssl zlib libuv ];
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DLWS_WITH_PLUGINS=ON" ];
NIX_CFLAGS_COMPILE = "-Wno-error=unused-but-set-variable";
2019-09-16 05:28:30 +01:00
meta = with stdenv.lib; {
description = "Light, portable C library for websockets";
longDescription = ''
Libwebsockets is a lightweight pure C library built to
use minimal CPU and memory resources, and provide fast
throughput in both directions.
'';
homepage = "https://libwebsockets.org/";
license = licenses.lgpl21;
platforms = platforms.all;
};
2015-09-13 19:49:13 +01:00
};
2019-09-16 05:28:30 +01:00
in
rec {
libwebsockets_3_1 = generic {
sha256 = "1w1wz6snf3cmcpa3f4dci2nz9za2f5rrylxl109id7bcb36xhbdl";
version = "3.1.0";
2015-09-13 19:49:13 +01:00
};
2019-09-16 05:28:30 +01:00
libwebsockets_3_2 = generic {
version = "3.2.2";
sha256 = "0m1kn4p167jv63zvwhsvmdn8azx3q7fkk8qc0fclwyps2scz6dna";
2019-09-16 05:28:30 +01:00
};
libwebsockets_4_0 = generic {
2020-04-04 16:26:22 +01:00
version = "4.0.1";
sha256 = "1pf7km0w5q7dqlwcwqizdpfqgg10prfq8g2c093f5nghwsfv8mmf";
};
2015-09-13 19:49:13 +01:00
}