From 355e9d6b251020faf8b3c8829e52f4382346dd16 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Wed, 18 Mar 2020 01:50:40 +0100 Subject: [PATCH] jitsi-videobridge: init at 2.1-202-g5f9377b9 --- pkgs/servers/jitsi-videobridge/default.nix | 47 +++++++++++++++++++ .../logging.properties-journal | 7 +++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 56 insertions(+) create mode 100644 pkgs/servers/jitsi-videobridge/default.nix create mode 100644 pkgs/servers/jitsi-videobridge/logging.properties-journal diff --git a/pkgs/servers/jitsi-videobridge/default.nix b/pkgs/servers/jitsi-videobridge/default.nix new file mode 100644 index 000000000000..242092056803 --- /dev/null +++ b/pkgs/servers/jitsi-videobridge/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchurl, dpkg, jre_headless, nixosTests }: + +let + pname = "jitsi-videobridge2"; + version = "2.1-202-g5f9377b9"; + src = fetchurl { + url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb"; + sha256 = "16xj4m6kz4di6y3vxrjkwajd7sfm92zzhrc6q9ljmrwiqnly5z0a"; + }; +in +stdenv.mkDerivation { + inherit pname version src; + + dontBuild = true; + + unpackCmd = "${dpkg}/bin/dpkg-deb -x $src debcontents"; + + installPhase = '' + substituteInPlace usr/share/jitsi-videobridge/jvb.sh \ + --replace "exec java" "exec ${jre_headless}/bin/java" + + mkdir -p $out/{bin,share/jitsi-videobridge,etc/jitsi/videobridge} + mv etc/jitsi/videobridge/logging.properties $out/etc/jitsi/videobridge/ + cp ${./logging.properties-journal} $out/etc/jitsi/videobridge/logging.properties-journal + mv usr/share/jitsi-videobridge/* $out/share/jitsi-videobridge/ + ln -s $out/share/jitsi-videobridge/jvb.sh $out/bin/jitsi-videobridge + ''; + + passthru.tests = { + single-host-smoke-test = nixosTests.jitsi-meet; + }; + + meta = with stdenv.lib; { + description = "A WebRTC compatible video router"; + longDescription = '' + Jitsi Videobridge is an XMPP server component that allows for multiuser video communication. + Unlike the expensive dedicated hardware videobridges, Jitsi Videobridge does not mix the video + channels into a composite video stream, but only relays the received video channels to all call + participants. Therefore, while it does need to run on a server with good network bandwidth, + CPU horsepower is not that critical for performance. + ''; + homepage = "https://github.com/jitsi/jitsi-videobridge"; + license = licenses.asl20; + maintainers = with maintainers; [ ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/servers/jitsi-videobridge/logging.properties-journal b/pkgs/servers/jitsi-videobridge/logging.properties-journal new file mode 100644 index 000000000000..915e32929122 --- /dev/null +++ b/pkgs/servers/jitsi-videobridge/logging.properties-journal @@ -0,0 +1,7 @@ +handlers = java.util.logging.ConsoleHandler +java.util.logging.ConsoleHandler.level = ALL +java.util.logging.ConsoleHandler.formatter = org.jitsi.utils.logging2.JitsiLogFormatter +.level = INFO +org.jitsi.videobridge.xmpp.ComponentImpl.level = FINE +org.jitsi.impl.neomedia.MediaStreamImpl.level = WARNING +org.jitsi.utils.logging2.JitsiLogFormatter.disableTimestamp = true diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd47b359681f..1b38740ede1f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15949,6 +15949,8 @@ in jetty = callPackage ../servers/http/jetty { }; + jitsi-videobridge = callPackage ../servers/jitsi-videobridge { }; + kapow = callPackage ../servers/kapow { }; keycloak = callPackage ../servers/keycloak { };