nixpkgs-suyu/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix

62 lines
1.6 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-04-10 12:09:13 +02:00
, fetchurl
, appimageTools
, makeWrapper
2021-07-31 01:41:01 +02:00
, electron_13
2021-03-12 11:32:19 +01:00
, xorg
2020-04-10 12:09:13 +02:00
}:
2020-06-03 18:44:25 +02:00
let
2021-07-31 01:41:01 +02:00
electron = electron_13;
2020-06-03 18:44:25 +02:00
in
2020-04-10 12:09:13 +02:00
stdenv.mkDerivation rec {
pname = "jitsi-meet-electron";
2021-07-31 01:41:01 +02:00
version = "2.8.9";
2020-04-10 12:09:13 +02:00
src = fetchurl {
url = "https://github.com/jitsi/jitsi-meet-electron/releases/download/v${version}/jitsi-meet-x86_64.AppImage";
2021-07-31 01:41:01 +02:00
sha256 = "sha256-PsMP0bDxlXAkRu3BgaUWcqnTfUKOGB81oHT94Xi8t8E=";
2020-06-03 18:44:25 +02:00
name = "${pname}-${version}.AppImage";
2020-04-10 12:09:13 +02:00
};
appimageContents = appimageTools.extractType2 {
name = "${pname}-${version}";
inherit src;
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/${pname} $out/share/applications
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
cp -a ${appimageContents}/jitsi-meet.desktop $out/share/applications/${pname}.desktop
cp -a ${appimageContents}/usr/share/icons $out/share
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
runHook postInstall
'';
postFixup = ''
2020-06-03 18:44:25 +02:00
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
2020-04-10 12:09:13 +02:00
--add-flags $out/share/${pname}/resources/app.asar \
2021-03-12 11:32:19 +01:00
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc xorg.libXtst ]}"
2020-04-10 12:09:13 +02:00
'';
meta = with lib; {
2020-04-10 12:09:13 +02:00
description = "Jitsi Meet desktop application powered by Electron";
homepage = "https://github.com/jitsi/jitsi-meet-electron";
license = licenses.asl20;
maintainers = teams.jitsi.members;
2020-04-10 12:09:13 +02:00
platforms = [ "x86_64-linux" ];
};
}