Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / servers / jitsi-videobridge / default.nix
blob4e258192c886198f0edb4c52a86289f079e6ae69
1 { lib, stdenv, fetchurl, makeWrapper, dpkg, jre_headless, openssl, nixosTests }:
3 let
4   pname = "jitsi-videobridge2";
5   version = "2.3-149-g793df5a9";
6   src = fetchurl {
7     url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb";
8     sha256 = "NI38XuBWSf+JoPCzAAd7Bma3PjprPw8CnE0W4VlqaVM=";
9   };
11 stdenv.mkDerivation {
12   inherit pname version src;
14   dontBuild = true;
16   unpackCmd = "${dpkg}/bin/dpkg-deb -x $src debcontents";
18   nativeBuildInputs = [ makeWrapper ];
20   installPhase = ''
21     runHook preInstall
22     substituteInPlace usr/share/jitsi-videobridge/jvb.sh \
23       --replace "exec java" "exec ${jre_headless}/bin/java"
25     mkdir -p $out/{bin,share/jitsi-videobridge,etc/jitsi/videobridge}
26     mv etc/jitsi/videobridge/logging.properties $out/etc/jitsi/videobridge/
27     cp ${./logging.properties-journal} $out/etc/jitsi/videobridge/logging.properties-journal
28     mv usr/share/jitsi-videobridge/* $out/share/jitsi-videobridge/
29     ln -s $out/share/jitsi-videobridge/jvb.sh $out/bin/jitsi-videobridge
31     # - work around https://github.com/jitsi/jitsi-videobridge/issues/1547
32     # - make libcrypto.so available at runtime for hardware AES
33     wrapProgram $out/bin/jitsi-videobridge \
34       --set VIDEOBRIDGE_GC_TYPE G1GC \
35       --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl ]}
36     runHook postInstall
37   '';
39   passthru.tests = {
40     single-host-smoke-test = nixosTests.jitsi-meet;
41   };
43   passthru.updateScript = ./update.sh;
45   meta = with lib; {
46     description = "WebRTC compatible video router";
47     longDescription = ''
48       Jitsi Videobridge is an XMPP server component that allows for multiuser video communication.
49       Unlike the expensive dedicated hardware videobridges, Jitsi Videobridge does not mix the video
50       channels into a composite video stream, but only relays the received video channels to all call
51       participants. Therefore, while it does need to run on a server with good network bandwidth,
52       CPU horsepower is not that critical for performance.
53     '';
54     homepage = "https://github.com/jitsi/jitsi-videobridge";
55     license = licenses.asl20;
56     maintainers = teams.jitsi.members;
57     platforms = platforms.linux;
58     mainProgram = "jitsi-videobridge";
59   };