@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, mkDerivation, autoPatchelfHook
1+{ stdenv, fetchurl, mkDerivation, autoPatchelfHook, bash
22, fetchFromGitHub
33# Dynamic libraries
44, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative
@@ -94,19 +94,35 @@ in mkDerivation {
9494 mkdir -p $out/share/icons/hicolor/$path/apps
9595 cp $icon $out/share/icons/hicolor/$path/apps/us.zoom.Zoom.png
9696 done
97−
98− ln -s $out/share/zoom-us/zoom $out/bin/zoom-us
9997 '';
10098
99+ # $out/share/zoom-us isn't in auto-wrap directories list, need manual wrapping
100+ dontWrapQtApps = true;
101+
101102 qtWrapperArgs = [
102103 ''--prefix PATH : ${makeBinPath [ coreutils glib.dev pciutils procps qttools.dev utillinux ]}''
103104 ''--prefix LD_PRELOAD : ${libv4l}/lib/libv4l/v4l2convert.so''
105+ # --run "cd ${placeholder "out"}/share/zoom-us"
106+ # ^^ unfortunately, breaks run arg into multiple array elements, due to
107+ # some bad array propagation. We'll do that in bash below
104108 ];
105109
110+ postFixup = ''
111+ # Zoom expects "zopen" executable (needed for web login) to be present in CWD. Or does it expect
112+ # everybody runs Zoom only after cd to Zoom package directory? Anyway, :facepalm:
113+ qtWrapperArgs+=( --run "cd ${placeholder "out"}/share/zoom-us" )
114+
115+ for app in ZoomLauncher zopen zoom; do
116+ wrapQtApp $out/share/zoom-us/$app
117+ done
118+
119+ ln -s $out/share/zoom-us/ZoomLauncher $out/bin/zoom-us
120+ '';
121+
106122 passthru.updateScript = ./update.sh;
107123
108124 meta = {
109− homepage = https://zoom.us/;
125+ homepage = "https://zoom.us/";
110126 description = "zoom.us video conferencing application";
111127 license = stdenv.lib.licenses.unfree;
112128 platforms = builtins.attrNames srcs;