forked from NixOS/nixpkgs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,47 @@ | ||
{ fetchFromGitHub, stdenv, cmake, openssl, zlib, libuv }: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "libwebsockets"; | ||
version = "3.2.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "warmcat"; | ||
repo = "libwebsockets"; | ||
rev = "v${version}"; | ||
sha256 = "0ac5755h3w1pl6cznqbvg63dwkqy544fqlhvqyp7s11hgs7jx6l8"; | ||
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" ]; | ||
|
||
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; | ||
}; | ||
}; | ||
|
||
buildInputs = [ cmake openssl zlib libuv ]; | ||
cmakeFlags = [ "-DLWS_WITH_PLUGINS=ON" ]; | ||
|
||
meta = { | ||
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://github.com/warmcat/libwebsockets; | ||
license = stdenv.lib.licenses.lgpl21; | ||
platforms = stdenv.lib.platforms.all; | ||
in | ||
rec { | ||
libwebsockets_3_1 = generic { | ||
sha256 = "1w1wz6snf3cmcpa3f4dci2nz9za2f5rrylxl109id7bcb36xhbdl"; | ||
version = "3.1.0"; | ||
}; | ||
|
||
libwebsockets_3_2 = generic { | ||
version = "3.2.0"; | ||
sha256 = "0ac5755h3w1pl6cznqbvg63dwkqy544fqlhvqyp7s11hgs7jx6l8"; | ||
}; | ||
|
||
libwebsockets = libwebsockets_3_2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters