2018-06-30 20:03:17 +03:00
|
|
|
{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook
|
2018-07-05 23:42:44 +03:00
|
|
|
# Dynamic libraries
|
|
|
|
, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative
|
|
|
|
, qtlocation, qtquickcontrols2, qtscript, qtwebchannel, qtwebengine
|
|
|
|
# Runtime
|
2018-07-07 23:35:35 +03:00
|
|
|
, libjpeg_turbo, pciutils, procps, qtimageformats
|
2018-07-05 23:42:44 +03:00
|
|
|
, pulseaudioSupport ? true, libpulseaudio ? null
|
2018-06-30 20:03:17 +03:00
|
|
|
}:
|
2017-06-07 12:01:01 +03:00
|
|
|
|
2018-07-05 23:42:44 +03:00
|
|
|
assert pulseaudioSupport -> libpulseaudio != null;
|
|
|
|
|
2017-06-07 12:01:01 +03:00
|
|
|
let
|
2018-07-05 23:42:44 +03:00
|
|
|
inherit (stdenv.lib) concatStringsSep makeBinPath optional optionalString;
|
2017-06-07 12:01:01 +03:00
|
|
|
|
2018-07-05 23:42:44 +03:00
|
|
|
version = "2.2.128200.0702";
|
2017-06-07 12:01:01 +03:00
|
|
|
srcs = {
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
|
2018-07-05 23:42:44 +03:00
|
|
|
sha256 = "0n9kyj94bj35gbpwiz4kq7hc8pwfqwnfqf003g4c8gx5pda3g56w";
|
2017-06-07 12:01:01 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "zoom-us-${version}";
|
|
|
|
|
|
|
|
src = srcs.${system};
|
|
|
|
|
2018-06-30 20:03:17 +03:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
2017-06-07 12:01:01 +03:00
|
|
|
|
2018-06-30 20:03:17 +03:00
|
|
|
buildInputs = [
|
|
|
|
dbus glib libGL libX11 libXfixes libuuid libxcb qtbase qtdeclarative
|
|
|
|
qtlocation qtquickcontrols2 qtscript qtwebchannel qtwebengine
|
2018-07-07 23:35:35 +03:00
|
|
|
libjpeg_turbo
|
2017-06-07 12:01:01 +03:00
|
|
|
];
|
|
|
|
|
2018-07-05 23:42:44 +03:00
|
|
|
runtimeDependencies = optional pulseaudioSupport libpulseaudio;
|
|
|
|
|
|
|
|
# Don't remove runtimeDependencies from RPATH via patchelf --shrink-rpath
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
2018-06-30 20:03:17 +03:00
|
|
|
installPhase =
|
|
|
|
let
|
2018-07-05 23:42:44 +03:00
|
|
|
files = concatStringsSep " " [
|
2018-06-30 20:03:17 +03:00
|
|
|
"*.pcm"
|
|
|
|
"*.png"
|
|
|
|
"ZXMPPROOT.cer"
|
|
|
|
"ZoomLauncher"
|
|
|
|
"config-dump.sh"
|
|
|
|
"qtdiag"
|
|
|
|
"timezones"
|
|
|
|
"translations"
|
|
|
|
"version.txt"
|
|
|
|
"zcacert.pem"
|
|
|
|
"zoom"
|
|
|
|
"zoom.sh"
|
|
|
|
"zoomlinux"
|
|
|
|
"zopen"
|
|
|
|
];
|
|
|
|
in ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
packagePath=$out/share/zoom-us
|
|
|
|
mkdir -p $packagePath $out/bin
|
|
|
|
|
|
|
|
cp -ar ${files} $packagePath
|
|
|
|
|
2018-07-05 23:42:44 +03:00
|
|
|
# TODO Patch this somehow; tries to dlopen './libturbojpeg.so' from cwd
|
|
|
|
ln -s $(readlink -e "${libjpeg_turbo.out}/lib/libturbojpeg.so") $packagePath/libturbojpeg.so
|
|
|
|
|
2018-06-30 20:03:17 +03:00
|
|
|
makeWrapper $packagePath/zoom $out/bin/zoom-us \
|
2018-07-05 23:42:44 +03:00
|
|
|
--prefix PATH : "${makeBinPath [ pciutils procps ]}" \
|
|
|
|
--set QSG_INFO 1 \
|
2018-07-07 23:35:35 +03:00
|
|
|
--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-${qtbase.qtCompatVersion}/plugins/platforms \
|
|
|
|
--set QT_PLUGIN_PATH ${qtbase.bin}/${qtbase.qtPluginPrefix}:${qtimageformats}/${qtbase.qtPluginPrefix} \
|
2018-07-05 23:42:44 +03:00
|
|
|
--run "cd $packagePath"
|
2018-06-30 20:03:17 +03:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2017-06-07 12:01:01 +03:00
|
|
|
|
2018-03-16 22:03:15 +03:00
|
|
|
postInstall = (makeDesktopItem {
|
|
|
|
name = "zoom-us";
|
|
|
|
exec = "$out/bin/zoom-us %U";
|
|
|
|
icon = "$out/share/zoom-us/application-x-zoom.png";
|
|
|
|
desktopName = "Zoom";
|
|
|
|
genericName = "Video Conference";
|
|
|
|
categories = "Network;Application;";
|
|
|
|
mimeType = "x-scheme-handler/zoommtg;";
|
|
|
|
}).buildCommand;
|
|
|
|
|
2018-06-30 20:03:17 +03:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2017-06-07 12:01:01 +03:00
|
|
|
meta = {
|
2017-08-03 07:09:34 +03:00
|
|
|
homepage = https://zoom.us/;
|
2017-06-07 12:01:01 +03:00
|
|
|
description = "zoom.us video conferencing application";
|
|
|
|
license = stdenv.lib.licenses.unfree;
|
2017-08-03 06:53:46 +03:00
|
|
|
platforms = builtins.attrNames srcs;
|
2018-07-07 23:35:35 +03:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ danbst tadfisher ];
|
2017-06-07 12:01:01 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|