zoom-us: 2.0.123200.0405 -> 2.2.128100.0627 (#42742)

This commit is contained in:
Tad Fisher 2018-06-30 10:03:17 -07:00 committed by xeji
parent 66e18c3aab
commit 81c2f270e5
3 changed files with 48 additions and 69 deletions

View File

@ -1,14 +1,16 @@
{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem, { stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook
alsaLib, dbus, glib, fontconfig, freetype, libpulseaudio, , dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, procps
utillinux, zlib, xorg, udev, sqlite, expat, libv4l, procps, libGL }: , qtbase, qtdeclarative, qtlocation, qtquickcontrols2, qtscript
, qtwebchannel, qtwebengine
}:
let let
version = "2.0.123200.0405"; version = "2.2.128100.0627";
srcs = { srcs = {
x86_64-linux = fetchurl { x86_64-linux = fetchurl {
url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz"; url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
sha256 = "1ifwa2xf5mw1ll2j1f39qd7mpyxpc6xj3650dmlnxf525dsm573z"; sha256 = "1x98zhs75c22x58zj4vzk8gb9yr7a9hfkbiqhjp5jrvccgz6ncin";
}; };
}; };
@ -17,76 +19,44 @@ in stdenv.mkDerivation {
src = srcs.${system}; src = srcs.${system};
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
libPath = stdenv.lib.makeLibraryPath [ buildInputs = [
alsaLib dbus glib libGL libX11 libXfixes libuuid libxcb qtbase qtdeclarative
expat qtlocation qtquickcontrols2 qtscript qtwebchannel qtwebengine
glib
freetype
libGL
libpulseaudio
zlib
dbus
fontconfig
sqlite
utillinux
udev
xorg.libX11
xorg.libSM
xorg.libICE
xorg.libxcb
xorg.xcbutilimage
xorg.xcbutilkeysyms
xorg.libXcursor
xorg.libXext
xorg.libXfixes
xorg.libXdamage
xorg.libXtst
xorg.libxshmfence
xorg.libXi
xorg.libXrender
xorg.libXcomposite
xorg.libXScrnSaver
xorg.libXrandr
stdenv.cc.cc
]; ];
installPhase = '' installPhase =
runHook preInstall let
files = stdenv.lib.concatStringsSep " " [
"*.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 packagePath=$out/share/zoom-us
mkdir -p $packagePath mkdir -p $packagePath $out/bin
mkdir -p $out/bin
cp -ar * $packagePath
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/zoom cp -ar ${files} $packagePath
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/QtWebEngineProcess
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/qtdiag
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/zopen
# included from https://github.com/NixOS/nixpkgs/commit/fc218766333a05c9352b386e0cbb16e1ae84bf53
# it works for me without it, but, well...
paxmark m $packagePath/zoom
#paxmark m $packagePath/QtWebEngineProcess # is this what dtzWill talked about?
# RUNPATH set via patchelf is used only for half of libraries (why?), so wrap it makeWrapper $packagePath/zoom $out/bin/zoom-us \
makeWrapper $packagePath/zoom $out/bin/zoom-us \ --prefix PATH : "${procps}/bin"
--prefix LD_LIBRARY_PATH : "$packagePath:$libPath" \
--prefix LD_PRELOAD : "${libv4l}/lib/v4l1compat.so" \
--prefix PATH : "${procps}/bin" \
--set QT_PLUGIN_PATH "$packagePath/platforms" \
--set QT_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb" \
--set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale"
cat > $packagePath/qt.conf <<EOF runHook postInstall
[Paths] '';
Prefix = $packagePath
EOF
runHook postInstall
'';
postInstall = (makeDesktopItem { postInstall = (makeDesktopItem {
name = "zoom-us"; name = "zoom-us";
@ -98,6 +68,8 @@ in stdenv.mkDerivation {
mimeType = "x-scheme-handler/zoommtg;"; mimeType = "x-scheme-handler/zoommtg;";
}).buildCommand; }).buildCommand;
passthru.updateScript = ./update.sh;
meta = { meta = {
homepage = https://zoom.us/; homepage = https://zoom.us/;
description = "zoom.us video conferencing application"; description = "zoom.us video conferencing application";

View File

@ -0,0 +1,7 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pcre common-updater-scripts
set -eu -o pipefail
version="$(curl -sI https://zoom.us/client/latest/zoom_x86_64.tar.xz | grep -Fi 'Location:' | pcregrep -o1 '/(([0-9]\.?)+)/')"
update-source-version zoom-us "$version"

View File

@ -19211,7 +19211,7 @@ with pkgs;
zim = callPackage ../applications/office/zim { }; zim = callPackage ../applications/office/zim { };
zoom-us = callPackage ../applications/networking/instant-messengers/zoom-us { }; zoom-us = libsForQt5.callPackage ../applications/networking/instant-messengers/zoom-us { };
zotero = callPackage ../applications/office/zotero { }; zotero = callPackage ../applications/office/zotero { };