about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/jibri
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-09-13 11:53:06 +0000
committerAlyssa Ross <hi@alyssa.is>2021-09-13 17:18:49 +0000
commitc3e005913d59b8ad64004e60888a71816688af1f (patch)
treef65b32f0d16acaa40f2ee82ac736d150de4b6cf5 /nixpkgs/pkgs/servers/jibri
parent1c8034da05499ca3d999f57ba1f6b235e7711ee1 (diff)
parentdb88608d8c811a93b74c99cfa1224952afc78200 (diff)
downloadnixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.gz
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.bz2
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.lz
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.xz
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.zst
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.zip
Merge commit 'db88608d8c811a93b74c99cfa1224952afc78200'
Conflicts:
	nixpkgs/nixos/modules/config/update-users-groups.pl
Diffstat (limited to 'nixpkgs/pkgs/servers/jibri')
-rw-r--r--nixpkgs/pkgs/servers/jibri/default.nix43
-rwxr-xr-xnixpkgs/pkgs/servers/jibri/update.sh12
2 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/jibri/default.nix b/nixpkgs/pkgs/servers/jibri/default.nix
new file mode 100644
index 000000000000..91d6a7ddf040
--- /dev/null
+++ b/nixpkgs/pkgs/servers/jibri/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl, dpkg, jre_headless, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "jibri";
+  version = "8.0-93-g51fe7a2";
+  src = fetchurl {
+    url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb";
+    sha256 = "1w78aa3rfdc4frb68ymykrbazxqrcv8mcdayqmcb72q1aa854c7j";
+  };
+
+  dontBuild = true;
+  nativeBuildInputs = [ dpkg makeWrapper ];
+  unpackCmd = "dpkg-deb -x $src debcontents";
+
+  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/
+
+    makeWrapper ${jre_headless}/bin/java $out/bin/jibri --add-flags "-jar $out/opt/jitsi/jibri/jibri.jar"
+
+    runHook postInstall
+  '';
+
+  passthru.updateScript = ./update.sh;
+
+  meta = with lib; {
+    description = "JItsi BRoadcasting Infrastructure";
+    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";
+    license = licenses.asl20;
+    maintainers = teams.jitsi.members;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/servers/jibri/update.sh b/nixpkgs/pkgs/servers/jibri/update.sh
new file mode 100755
index 000000000000..9606a5170c1a
--- /dev/null
+++ b/nixpkgs/pkgs/servers/jibri/update.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl pup common-updater-scripts
+
+set -eu -o pipefail
+
+version="$(curl https://download.jitsi.org/stable/ | \
+    pup 'a[href] text{}' | \
+    awk -F'[_-]' '/jibri/ {printf $2"-"$3"-"$4"\n"}' | \
+    sort -u | \
+    tail -n 1)"
+
+update-source-version jibri "$version"