2019-08-22 11:17:29 +00:00
|
|
|
{ mkDerivation, lib, fetchurl, autoPatchelfHook, makeWrapper, xdg_utils, dbus
|
2019-08-22 21:43:43 +00:00
|
|
|
, qtbase, qtwebkit, qtx11extras, qtquickcontrols, glibc
|
|
|
|
, libXrandr, libX11, libXext, libXdamage, libXtst, libSM, libXfixes
|
2019-08-22 11:17:29 +00:00
|
|
|
, wrapQtAppsHook
|
|
|
|
}:
|
2015-12-03 14:56:21 +00:00
|
|
|
|
2019-08-22 11:17:29 +00:00
|
|
|
mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "teamviewer";
|
2019-11-09 15:01:14 +00:00
|
|
|
version = "14.7.1965";
|
2016-06-03 20:45:26 +00:00
|
|
|
|
2015-12-03 14:56:21 +00:00
|
|
|
src = fetchurl {
|
2019-01-18 06:39:42 +00:00
|
|
|
url = "https://dl.tvcdn.de/download/linux/version_14x/teamviewer_${version}_amd64.deb";
|
2019-11-09 15:01:14 +00:00
|
|
|
sha256 = "056050x173y450apl096vw8g3b3kvrd2b4xpj706nw6jdxsnhfbp";
|
2015-12-03 14:56:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
ar x $src
|
|
|
|
tar xf data.tar.*
|
|
|
|
'';
|
|
|
|
|
2019-08-22 11:17:29 +00:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper wrapQtAppsHook ];
|
2018-04-26 12:04:13 +00:00
|
|
|
buildInputs = [ dbus qtbase qtwebkit qtx11extras libX11 ];
|
|
|
|
propagatedBuildInputs = [ qtquickcontrols ];
|
|
|
|
|
2015-12-03 14:56:21 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/teamviewer $out/bin $out/share/applications
|
|
|
|
cp -a opt/teamviewer/* $out/share/teamviewer
|
|
|
|
rm -R \
|
|
|
|
$out/share/teamviewer/logfiles \
|
|
|
|
$out/share/teamviewer/config \
|
2017-04-12 23:14:03 +00:00
|
|
|
$out/share/teamviewer/tv_bin/xdg-utils \
|
2015-12-03 14:56:21 +00:00
|
|
|
$out/share/teamviewer/tv_bin/script/{teamviewer_setup,teamviewerd.sysv,teamviewerd.service,teamviewerd.*.conf,libdepend,tv-delayed-start.sh}
|
|
|
|
|
|
|
|
ln -s $out/share/teamviewer/tv_bin/script/teamviewer $out/bin
|
|
|
|
ln -s $out/share/teamviewer/tv_bin/teamviewerd $out/bin
|
2016-12-17 18:04:48 +00:00
|
|
|
ln -s $out/share/teamviewer/tv_bin/desktop/com.teamviewer.*.desktop $out/share/applications
|
2015-12-03 14:56:21 +00:00
|
|
|
ln -s /var/lib/teamviewer $out/share/teamviewer/config
|
|
|
|
ln -s /var/log/teamviewer $out/share/teamviewer/logfiles
|
|
|
|
ln -s ${xdg_utils}/bin $out/share/teamviewer/tv_bin/xdg-utils
|
|
|
|
|
2018-04-26 12:04:13 +00:00
|
|
|
sed -i "s,/opt/teamviewer,$out/share/teamviewer,g" $out/share/teamviewer/tv_bin/desktop/com.teamviewer.*.desktop
|
2015-12-03 14:56:21 +00:00
|
|
|
|
2018-04-26 12:04:13 +00:00
|
|
|
substituteInPlace $out/share/teamviewer/tv_bin/script/tvw_aux \
|
|
|
|
--replace '/lib64/ld-linux-x86-64.so.2' '${glibc.out}/lib/ld-linux-x86-64.so.2'
|
|
|
|
substituteInPlace $out/share/teamviewer/tv_bin/script/tvw_config \
|
|
|
|
--replace '/var/run/' '/run/'
|
2019-08-22 21:43:43 +00:00
|
|
|
|
2019-08-22 11:17:29 +00:00
|
|
|
wrapProgram $out/share/teamviewer/tv_bin/script/teamviewer --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 ]}"
|
|
|
|
wrapProgram $out/share/teamviewer/tv_bin/teamviewerd --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 ]}"
|
2019-08-22 21:43:43 +00:00
|
|
|
wrapProgram $out/share/teamviewer/tv_bin/TeamViewer --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 ]}"
|
|
|
|
wrapProgram $out/share/teamviewer/tv_bin/TeamViewer_Desktop --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [libXrandr libX11 libXext libXdamage libXtst libSM libXfixes ]}"
|
2019-08-22 11:17:29 +00:00
|
|
|
|
|
|
|
wrapQtApp $out/bin/teamviewer
|
2015-12-03 14:56:21 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
2019-09-12 20:22:31 +00:00
|
|
|
preferLocalBuild = true;
|
2015-12-03 14:56:21 +00:00
|
|
|
|
2019-08-22 11:17:29 +00:00
|
|
|
meta = with lib; {
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = http://www.teamviewer.com;
|
2015-12-03 14:56:21 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
description = "Desktop sharing application, providing remote support and online meetings";
|
2018-04-26 12:04:13 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2017-04-12 23:14:03 +00:00
|
|
|
maintainers = with maintainers; [ jagajaga dasuxullebt ];
|
2015-12-03 14:56:21 +00:00
|
|
|
};
|
|
|
|
}
|