2021-07-16 19:40:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, gengetopt
|
|
|
|
, glib, libconfig, libnice, jansson, boringssl, zlib, srtp, libuv
|
|
|
|
, libmicrohttpd, curl, libwebsockets, sofia_sip, libogg, libopus
|
|
|
|
, usrsctp, ffmpeg
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
libwebsockets_janus = libwebsockets.overrideAttrs (_: {
|
|
|
|
configureFlags = [
|
|
|
|
"-DLWS_MAX_SMP=1"
|
|
|
|
"-DLWS_WITHOUT_EXTENSIONS=0"
|
|
|
|
];
|
|
|
|
});
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "janus-gateway";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.11.8";
|
2021-07-16 19:40:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "meetecho";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-otTIDwcbF8Rcas048Vkn30v39GYIYbAIY72ipJhIwC4=";
|
2021-07-16 19:40:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config gengetopt ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib libconfig libnice jansson boringssl zlib srtp libuv libmicrohttpd
|
|
|
|
curl libwebsockets_janus sofia_sip libogg libopus usrsctp ffmpeg
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
2021-12-06 16:07:01 +00:00
|
|
|
"--enable-boringssl=${lib.getDev boringssl}"
|
2021-07-16 19:40:57 +00:00
|
|
|
"--enable-libsrtp2"
|
|
|
|
"--enable-turn-rest-api"
|
|
|
|
"--enable-json-logger"
|
|
|
|
"--enable-gelf-event-handler"
|
|
|
|
"--enable-post-processing"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
makeFlagsArray = [
|
|
|
|
"BORINGSSL_LIBS=-L${lib.getLib boringssl}/lib"
|
|
|
|
];
|
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
outputs = [ "out" "dev" "doc" "man" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
moveToOutput share/janus "$doc"
|
|
|
|
moveToOutput etc "$doc"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "General purpose WebRTC server";
|
|
|
|
homepage = "https://janus.conf.meetecho.com/";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ fpletz ];
|
|
|
|
};
|
|
|
|
}
|