packages/pkgs/janus-gateway/default.nix

60 lines
1.4 KiB
Nix
Raw Permalink Normal View History

{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, gengetopt
, glib, libconfig, libnice, jansson, boringssl, zlib, srtp, libuv
, libmicrohttpd, curl, libwebsockets, sofia_sip, libogg, libopus
, usrsctp, ffmpeg
2021-03-13 21:41:47 +01:00
}:
let
libwebsockets_janus = libwebsockets.overrideAttrs (_: {
configureFlags = [
"-DLWS_MAX_SMP=1"
"-DLWS_WITHOUT_EXTENSIONS=0"
];
});
in
2021-03-13 21:41:47 +01:00
stdenv.mkDerivation rec {
pname = "janus-gateway";
2021-09-09 00:29:32 +02:00
version = "0.11.4";
2021-03-13 21:41:47 +01:00
src = fetchFromGitHub {
owner = "meetecho";
repo = pname;
rev = "v${version}";
2021-09-09 00:29:32 +02:00
sha256 = "sha256-K+6r7Nz+zzEDNd5Y44+V7x80DPxjaithregEg+goXk0=";
2021-03-13 21:41:47 +01:00
};
nativeBuildInputs = [ autoreconfHook pkg-config gengetopt ];
2021-03-13 21:41:47 +01:00
buildInputs = [
glib libconfig libnice jansson boringssl zlib srtp libuv libmicrohttpd
curl libwebsockets_janus sofia_sip libogg libopus usrsctp ffmpeg
2021-03-13 21:41:47 +01:00
];
enableParallelBuilding = true;
configureFlags = [
"--enable-boringssl=${boringssl}"
"--enable-libsrtp2"
"--enable-turn-rest-api"
"--enable-json-logger"
"--enable-gelf-event-handler"
"--enable-post-processing"
];
outputs = [ "out" "dev" "doc" "man" ];
postInstall = ''
moveToOutput share/janus "$doc"
moveToOutput etc "$doc"
'';
2021-03-13 21:41:47 +01:00
meta = with lib; {
description = "General purpose WebRTC server";
homepage = "https://janus.conf.meetecho.com/";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ fpletz ];
2021-03-13 21:41:47 +01:00
};
}