3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix

61 lines
1.6 KiB
Nix
Raw Normal View History

2020-04-10 11:09:13 +01:00
{ stdenv
, fetchurl
, appimageTools
, makeWrapper
2020-06-03 17:44:25 +01:00
, electron_9
2020-04-10 11:09:13 +01:00
}:
2020-06-03 17:44:25 +01:00
let
electron = electron_9;
in
2020-04-10 11:09:13 +01:00
stdenv.mkDerivation rec {
pname = "jitsi-meet-electron";
2020-06-03 17:44:25 +01:00
version = "2.2.0";
2020-04-10 11:09:13 +01:00
src = fetchurl {
url = "https://github.com/jitsi/jitsi-meet-electron/releases/download/v${version}/jitsi-meet-x86_64.AppImage";
2020-06-03 17:44:25 +01:00
sha256 = "0gqyqjj69x1gxwj4zhwazddnj5xzy598xqz7vwkpdm1ldzna2iyj";
name = "${pname}-${version}.AppImage";
2020-04-10 11:09:13 +01: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 17:44:25 +01:00
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
2020-04-10 11:09:13 +01:00
--add-flags $out/share/${pname}/resources/app.asar \
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}"
'';
meta = with stdenv.lib; {
description = "Jitsi Meet desktop application powered by Electron";
homepage = "https://github.com/jitsi/jitsi-meet-electron";
license = licenses.asl20;
maintainers = with maintainers; [ prusnak ];
platforms = [ "x86_64-linux" ];
};
}