3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/zoom-us/default.nix

97 lines
2.7 KiB
Nix
Raw Normal View History

2019-07-29 21:34:40 +01:00
{ stdenv, fetchurl, mkDerivation, makeWrapper, makeDesktopItem, autoPatchelfHook
, wrapQtAppsHook
# 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
# Runtime
, coreutils, libjpeg_turbo, pciutils, procps, utillinux, libv4l
, pulseaudioSupport ? true, libpulseaudio ? null
}:
assert pulseaudioSupport -> libpulseaudio != null;
let
inherit (stdenv.lib) concatStringsSep makeBinPath optional;
version = "2.9.265650.0716";
srcs = {
x86_64-linux = fetchurl {
url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
sha256 = "1wg5yw8g0c6p9y0wcqxr1rndgclasg7v1ybbx8s1a2p98izjkcaa";
};
};
2019-07-29 21:34:40 +01:00
in mkDerivation {
name = "zoom-us-${version}";
src = srcs.${stdenv.hostPlatform.system};
2019-07-29 21:34:40 +01:00
nativeBuildInputs = [ autoPatchelfHook makeWrapper wrapQtAppsHook ];
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
];
runtimeDependencies = optional pulseaudioSupport libpulseaudio;
installPhase =
let
files = concatStringsSep " " [
"*.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}
2019-07-29 21:34:40 +01:00
cp -ar ${files} $out/share/zoom-us
# 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
runHook postInstall
'';
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
passthru.updateScript = ./update.sh;
meta = {
homepage = https://zoom.us/;
description = "zoom.us video conferencing application";
license = stdenv.lib.licenses.unfree;
platforms = builtins.attrNames srcs;
maintainers = with stdenv.lib.maintainers; [ danbst tadfisher ];
};
}