2017-06-07 14:20:00 +00:00
|
|
|
{ stdenv, fetchurl, system, makeWrapper,
|
2017-06-07 09:01:01 +00:00
|
|
|
alsaLib, dbus, glib, gstreamer, fontconfig, freetype, libpulseaudio, libxml2,
|
2017-06-15 12:56:49 +00:00
|
|
|
libxslt, mesa, nspr, nss, sqlite, utillinux, zlib, xorg, udev, expat, libv4l }:
|
2017-06-07 09:01:01 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
version = "2.0.91373.0502";
|
|
|
|
srcs = {
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
|
|
|
|
sha256 = "0gcbfsvybkvnyklm82irgz19x3jl0hz9bwf2l9jga188057pfj7a";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "zoom-us-${version}";
|
|
|
|
|
|
|
|
src = srcs.${system};
|
|
|
|
|
2017-06-07 14:20:00 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
2017-06-07 09:01:01 +00:00
|
|
|
|
|
|
|
libPath = stdenv.lib.makeLibraryPath [
|
|
|
|
alsaLib
|
|
|
|
dbus
|
|
|
|
glib
|
|
|
|
gstreamer
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
libpulseaudio
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
sqlite
|
|
|
|
utillinux
|
|
|
|
zlib
|
2017-06-15 12:53:41 +00:00
|
|
|
udev
|
|
|
|
expat
|
2017-06-07 09:01:01 +00:00
|
|
|
|
|
|
|
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
|
2017-06-15 12:53:41 +00:00
|
|
|
xorg.libXScrnSaver
|
2017-06-07 09:01:01 +00:00
|
|
|
|
|
|
|
stdenv.cc.cc
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
$preInstallHooks
|
|
|
|
|
2017-06-07 14:20:00 +00:00
|
|
|
packagePath=$out/share/zoom-us
|
|
|
|
mkdir -p $packagePath
|
2017-06-07 09:01:01 +00:00
|
|
|
mkdir -p $out/bin
|
2017-06-07 14:20:00 +00:00
|
|
|
cp -ar * $packagePath
|
2017-06-07 09:01:01 +00:00
|
|
|
|
2017-06-15 12:53:41 +00:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/zoom
|
|
|
|
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
|
2017-06-07 09:01:01 +00:00
|
|
|
# included from https://github.com/NixOS/nixpkgs/commit/fc218766333a05c9352b386e0cbb16e1ae84bf53
|
|
|
|
# it works for me without it, but, well...
|
2017-06-07 14:20:00 +00:00
|
|
|
paxmark m $packagePath/zoom
|
|
|
|
#paxmark m $packagePath/QtWebEngineProcess # is this what dtzWill talked about?
|
2017-06-07 09:01:01 +00:00
|
|
|
|
|
|
|
# RUNPATH set via patchelf is used only for half of libraries (why?), so wrap it
|
2017-06-07 14:20:00 +00:00
|
|
|
wrapProgram $packagePath/zoom \
|
|
|
|
--prefix LD_LIBRARY_PATH : "$packagePath:$libPath" \
|
2017-06-15 12:56:49 +00:00
|
|
|
--prefix LD_PRELOAD : "${libv4l}/lib/v4l1compat.so" \
|
2017-06-07 14:20:00 +00:00
|
|
|
--set QT_PLUGIN_PATH "$packagePath/platforms" \
|
2017-06-07 09:01:01 +00:00
|
|
|
--set QT_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb" \
|
|
|
|
--set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale"
|
2017-06-07 14:20:00 +00:00
|
|
|
ln -s "$packagePath/zoom" "$out/bin/zoom-us"
|
2017-06-07 09:01:01 +00:00
|
|
|
|
2017-06-15 12:53:41 +00:00
|
|
|
cat > $packagePath/qt.conf <<EOF
|
|
|
|
[Paths]
|
|
|
|
Prefix = $packagePath
|
|
|
|
EOF
|
|
|
|
|
2017-06-07 09:01:01 +00:00
|
|
|
$postInstallHooks
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2017-08-03 04:09:34 +00:00
|
|
|
homepage = https://zoom.us/;
|
2017-06-07 09:01:01 +00:00
|
|
|
description = "zoom.us video conferencing application";
|
|
|
|
license = stdenv.lib.licenses.unfree;
|
2017-08-03 03:53:46 +00:00
|
|
|
platforms = builtins.attrNames srcs;
|
2017-06-07 09:01:01 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ danbst ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|