2013-11-20 23:25:23 +00:00
|
|
|
{ stdenv, fetchurl, libX11, libXtst, libXext, libXdamage, libXfixes, wineUnstable, makeWrapper, libXau
|
2014-10-30 09:03:25 +00:00
|
|
|
, bash, patchelf, config }:
|
2013-03-22 11:41:16 +00:00
|
|
|
|
|
|
|
let
|
2013-11-20 23:25:23 +00:00
|
|
|
topath = "${wineUnstable}/bin";
|
2013-03-22 11:41:16 +00:00
|
|
|
|
|
|
|
toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib")
|
2015-01-15 04:25:26 +00:00
|
|
|
[ stdenv.cc.cc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]);
|
2013-03-22 11:41:16 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "teamviewer-8.0.17147";
|
|
|
|
src = fetchurl {
|
2014-10-30 09:03:25 +00:00
|
|
|
url = config.teamviewer8.url or "http://download.teamviewer.com/download/version_8x/teamviewer_linux_x64.deb";
|
|
|
|
sha256 = config.teamviewer8.sha256 or "0s5m15f99rdmspzwx3gb9mqd6jx1bgfm0d6rfd01k9rf7gi7qk0k";
|
2013-03-22 11:41:16 +00:00
|
|
|
};
|
|
|
|
|
2013-11-18 19:37:40 +00:00
|
|
|
buildInputs = [ makeWrapper patchelf ];
|
2013-03-22 11:41:16 +00:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
ar x $src
|
|
|
|
tar xf data.tar.gz
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/teamviewer8 $out/bin
|
|
|
|
cp -a opt/teamviewer8/* $out/share/teamviewer8
|
|
|
|
rm -R $out/share/teamviewer8/tv_bin/wine/{bin,lib,share}
|
|
|
|
|
|
|
|
cat > $out/bin/teamviewer << EOF
|
|
|
|
#!${bash}/bin/sh
|
|
|
|
export LD_LIBRARY_PATH=${toldpath}\''${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}
|
|
|
|
export PATH=${topath}\''${PATH:+:\$PATH}
|
2013-11-20 23:25:23 +00:00
|
|
|
$out/share/teamviewer8/tv_bin/script/teamviewer "\$@"
|
2013-03-22 11:41:16 +00:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/teamviewer
|
2013-11-18 19:37:40 +00:00
|
|
|
|
2015-01-15 04:25:26 +00:00
|
|
|
patchelf --set-rpath "${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer8/tv_bin/teamviewerd
|
2014-12-17 18:11:30 +00:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/teamviewer8/tv_bin/teamviewerd
|
2013-11-18 19:37:40 +00:00
|
|
|
ln -s $out/share/teamviewer8/tv_bin/teamviewerd $out/bin/
|
2013-03-22 11:41:16 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://www.teamviewer.com";
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.unfree;
|
2013-03-22 11:41:16 +00:00
|
|
|
description = "Desktop sharing application, providing remote support and online meetings";
|
|
|
|
};
|
|
|
|
}
|