nixpkgs/pkgs/servers/jibri/default.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

73 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchurl,
dpkg,
jdk11_headless,
makeWrapper,
writeText,
xorg,
nixosTests,
}:
let
xorgModulePaths = writeText "module-paths" ''
Section "Files"
ModulePath "${xorg.xorgserver}/lib/xorg/modules
ModulePath "${xorg.xorgserver}/lib/xorg/extensions
ModulePath "${xorg.xorgserver}/lib/xorg/drivers
ModulePath "${xorg.xf86videodummy}/lib/xorg/modules/drivers
EndSection
'';
in
stdenv.mkDerivation rec {
pname = "jibri";
version = "8.0-173-g77dc5a9";
src = fetchurl {
url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb";
sha256 = "lJ1DdSKqS5D0QQSoePH8M3EAUHewfooO7avFfD+NtFc=";
};
dontBuild = true;
nativeBuildInputs = [
dpkg
makeWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,opt/jitsi/jibri,etc/jitsi/jibri}
mv etc/jitsi/jibri/* $out/etc/jitsi/jibri/
mv opt/jitsi/jibri/* $out/opt/jitsi/jibri/
cat '${xorgModulePaths}' >> $out/etc/jitsi/jibri/xorg-video-dummy.conf
makeWrapper ${jdk11_headless}/bin/java $out/bin/jibri --add-flags "-jar $out/opt/jitsi/jibri/jibri.jar"
runHook postInstall
'';
passthru.updateScript = ./update.sh;
passthru.tests = { inherit (nixosTests) jibri; };
meta = with lib; {
description = "JItsi BRoadcasting Infrastructure";
mainProgram = "jibri";
longDescription = ''
Jibri provides services for recording or streaming a Jitsi Meet conference.
It works by launching a Chrome instance rendered in a virtual framebuffer and capturing and
encoding the output with ffmpeg. It is intended to be run on a separate machine (or a VM), with
no other applications using the display or audio devices. Only one recording at a time is
supported on a single jibri.
'';
homepage = "https://github.com/jitsi/jibri";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
maintainers = teams.jitsi.members;
platforms = platforms.linux;
};
}