2019-07-29 21:34:40 +01:00
|
|
|
{ stdenv, fetchurl, mkDerivation, makeWrapper, makeDesktopItem, autoPatchelfHook
|
|
|
|
, wrapQtAppsHook
|
2018-07-05 21:42:44 +01:00
|
|
|
# Dynamic libraries
|
|
|
|
, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative
|
2018-07-12 20:03:56 +01:00
|
|
|
, qtimageformats, qtlocation, qtquickcontrols, qtquickcontrols2, qtscript, qtsvg
|
|
|
|
, qttools, qtwayland, qtwebchannel, qtwebengine
|
2018-07-05 21:42:44 +01:00
|
|
|
# Runtime
|
2019-06-03 18:08:45 +01:00
|
|
|
, coreutils, libjpeg_turbo, pciutils, procps, utillinux, libv4l
|
2018-07-05 21:42:44 +01:00
|
|
|
, pulseaudioSupport ? true, libpulseaudio ? null
|
2018-06-30 18:03:17 +01:00
|
|
|
}:
|
2017-06-07 10:01:01 +01:00
|
|
|
|
2018-07-05 21:42:44 +01:00
|
|
|
assert pulseaudioSupport -> libpulseaudio != null;
|
|
|
|
|
2017-06-07 10:01:01 +01:00
|
|
|
let
|
2018-07-20 20:36:12 +01:00
|
|
|
inherit (stdenv.lib) concatStringsSep makeBinPath optional;
|
2017-06-07 10:01:01 +01:00
|
|
|
|
2019-07-17 12:52:37 +01:00
|
|
|
version = "2.9.265650.0716";
|
2017-06-07 10:01:01 +01:00
|
|
|
srcs = {
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
|
2019-07-17 12:52:37 +01:00
|
|
|
sha256 = "1wg5yw8g0c6p9y0wcqxr1rndgclasg7v1ybbx8s1a2p98izjkcaa";
|
2017-06-07 10:01:01 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-07-29 21:34:40 +01:00
|
|
|
in mkDerivation {
|
2017-06-07 10:01:01 +01:00
|
|
|
name = "zoom-us-${version}";
|
|
|
|
|
2018-08-20 20:11:29 +01:00
|
|
|
src = srcs.${stdenv.hostPlatform.system};
|
2017-06-07 10:01:01 +01:00
|
|
|
|
2019-07-29 21:34:40 +01:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper wrapQtAppsHook ];
|
2017-06-07 10:01:01 +01:00
|
|
|
|
2018-06-30 18:03:17 +01:00
|
|
|
buildInputs = [
|
2019-07-29 21:34:40 +01:00
|
|
|
dbus glib libGL libX11 libXfixes libuuid libxcb libjpeg_turbo
|
|
|
|
qtbase qtdeclarative qtlocation qtquickcontrols qtquickcontrols2 qtscript
|
|
|
|
qtwebchannel qtwebengine qtimageformats qtsvg qttools qtwayland
|
|
|
|
];
|
2017-06-07 10:01:01 +01:00
|
|
|
|
2018-07-05 21:42:44 +01:00
|
|
|
runtimeDependencies = optional pulseaudioSupport libpulseaudio;
|
|
|
|
|
2018-06-30 18:03:17 +01:00
|
|
|
installPhase =
|
|
|
|
let
|
2018-07-05 21:42:44 +01:00
|
|
|
files = concatStringsSep " " [
|
2018-06-30 18:03:17 +01:00
|
|
|
"*.pcm"
|
|
|
|
"*.png"
|
|
|
|
"ZoomLauncher"
|
|
|
|
"config-dump.sh"
|
|
|
|
"timezones"
|
|
|
|
"translations"
|
|
|
|
"version.txt"
|
|
|
|
"zcacert.pem"
|
|
|
|
"zoom"
|
|
|
|
"zoom.sh"
|
|
|
|
"zoomlinux"
|
|
|
|
"zopen"
|
|
|
|
];
|
|
|
|
in ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2019-07-29 21:34:40 +01:00
|
|
|
mkdir -p $out/{bin,share/zoom-us}
|
2018-06-30 18:03:17 +01:00
|
|
|
|
2019-07-29 21:34:40 +01:00
|
|
|
cp -ar ${files} $out/share/zoom-us
|
2018-06-30 18:03:17 +01:00
|
|
|
|
2018-07-05 21:42:44 +01:00
|
|
|
# TODO Patch this somehow; tries to dlopen './libturbojpeg.so' from cwd
|
2019-07-29 21:34:40 +01:00
|
|
|
ln -s $(readlink -e "${libjpeg_turbo.out}/lib/libturbojpeg.so") $out/share/zoom-us/libturbojpeg.so
|
2018-06-30 18:03:17 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2017-06-07 10:01:01 +01:00
|
|
|
|
2018-03-16 19:03:15 +00: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;";
|
2019-07-29 21:34:40 +01:00
|
|
|
}).buildCommand + ''
|
|
|
|
ln -s $out/share/zoom-us/zoom $out/bin/zoom-us
|
|
|
|
'';
|
|
|
|
|
|
|
|
qtWrapperArgs = [
|
|
|
|
''--prefix PATH : ${makeBinPath [ coreutils glib.dev pciutils procps qttools.dev utillinux ]}''
|
|
|
|
''--prefix LD_PRELOAD : ${libv4l}/lib/libv4l/v4l2convert.so''
|
|
|
|
];
|
2018-03-16 19:03:15 +00:00
|
|
|
|
2018-06-30 18:03:17 +01:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2017-06-07 10:01:01 +01:00
|
|
|
meta = {
|
2017-08-03 05:09:34 +01:00
|
|
|
homepage = https://zoom.us/;
|
2017-06-07 10:01:01 +01:00
|
|
|
description = "zoom.us video conferencing application";
|
|
|
|
license = stdenv.lib.licenses.unfree;
|
2017-08-03 04:53:46 +01:00
|
|
|
platforms = builtins.attrNames srcs;
|
2018-07-07 21:35:35 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ danbst tadfisher ];
|
2017-06-07 10:01:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|