zoom-us: 2.052458.0531 -> 2.0.707090.1031, paxmark

* paxmark zoom to fix execution on PaX-enabled kernels[1]
* Requires moving from qt55 to qt56
* Put libs as buildInputs so that wrapQtProgram sees their paths!
* Don't use bundled Qt libs.
  (if these should be used, we shouldn't put our own on rpath, etc.)

[1] Without this, program fails to start (but doesn't exit),
and the following exception is logged a few times:

Dec 07 12:24:26 hostname kernel: grsec: denied RWX mmap of <anonymous mapping> by /nix/store/v1i2bff9fs7w1vycv0y615phhs7hky87-zoom-us/share/.zoom-wrapped[.zoom-wrapped:23812] uid/euid:1000/1

zoom still won't run unless using a pax-fixed version of qtwebengine.
( see: https://github.com/NixOS/nixpkgs/pull/20991 )
This commit is contained in:
Will Dietz 2016-12-07 12:33:47 -06:00
parent 1c50bdd928
commit fc21876633

View File

@ -10,7 +10,7 @@
, libxml2 , libxml2
, libxslt , libxslt
, makeQtWrapper , makeQtWrapper
, qt55 , qt56
, sqlite , sqlite
, stdenv , stdenv
, xlibs , xlibs
@ -27,15 +27,15 @@ stdenv.mkDerivation rec {
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.linux;
}; };
version = "2.0.52458.0531"; version = "2.0.70790.1031";
src = fetchurl { src = fetchurl {
url = "https://zoom.us/client/${version}/zoom_${version}_x86_64.tar.xz"; url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
sha256 = "16d64pn9j27v3fnh4c9i32vpkr10q1yr26w14964n0af1mv5jf7a"; sha256 = "0kkg3bqv8zwhpxgrssa7ds00dxhdimnq2vfklgrdqn5qzbij31hd";
}; };
phases = [ "unpackPhase" "installPhase" ]; phases = [ "unpackPhase" "installPhase" ];
nativeBuildInputs = [ makeQtWrapper ]; nativeBuildInputs = [ makeQtWrapper ];
libPath = stdenv.lib.makeLibraryPath [ buildInputs = [
alsaLib alsaLib
gcc.cc gcc.cc
glib glib
@ -46,10 +46,12 @@ stdenv.mkDerivation rec {
libuuid libuuid
libxml2 libxml2
libxslt libxslt
qt55.qtbase qt56.qtbase
qt55.qtdeclarative qt56.qtdeclarative
qt55.qtscript qt56.qtlocation
qt55.qtwebkit qt56.qtscript
qt56.qtwebchannel
qt56.qtwebengine
sqlite sqlite
xlibs.xcbutilkeysyms xlibs.xcbutilkeysyms
xorg.libX11 xorg.libX11
@ -61,13 +63,15 @@ stdenv.mkDerivation rec {
xorg.xcbutilimage xorg.xcbutilimage
zlib zlib
]; ];
libPath = stdenv.lib.makeLibraryPath buildInputs;
installPhase = '' installPhase = ''
mkdir -p $out/share mkdir -p $out/share
cp -r \ cp -r \
application-x-zoom.png \ application-x-zoom.png \
audio \ audio \
imageformats \ imageformats \
chrome.bmp \
config-dump.sh \ config-dump.sh \
dingdong1.pcm \ dingdong1.pcm \
dingdong.pcm \ dingdong.pcm \
@ -77,13 +81,7 @@ stdenv.mkDerivation rec {
platforminputcontexts \ platforminputcontexts \
platforms \ platforms \
platformthemes \ platformthemes \
Qt \ leave.pcm \
QtMultimedia \
QtQml \
QtQuick \
QtQuick.2 \
QtWebKit \
QtWebProcess \
ring.pcm \ ring.pcm \
ring.wav \ ring.wav \
version.txt \ version.txt \
@ -98,6 +96,7 @@ stdenv.mkDerivation rec {
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath ${libPath} \ --set-rpath ${libPath} \
$out/share/zoom $out/share/zoom
paxmark m $out/share/zoom
wrapQtProgram "$out/share/zoom" wrapQtProgram "$out/share/zoom"
mkdir -p $out/bin mkdir -p $out/bin
ln -s $out/share/zoom $out/bin/zoom-us ln -s $out/share/zoom $out/bin/zoom-us