2013-11-21 00:25:23 +01:00
|
|
|
{ stdenv, fetchurl, libX11, libXtst, libXext, libXdamage, libXfixes, wineUnstable, makeWrapper, libXau
|
2013-11-18 20:37:40 +01:00
|
|
|
, bash, patchelf }:
|
2013-03-22 12:41:16 +01:00
|
|
|
|
|
|
|
let
|
2013-11-21 00:25:23 +01:00
|
|
|
topath = "${wineUnstable}/bin";
|
2013-03-22 12:41:16 +01:00
|
|
|
|
|
|
|
toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib")
|
2013-11-21 00:25:23 +01:00
|
|
|
[ stdenv.gcc.gcc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]);
|
2013-03-22 12:41:16 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "teamviewer-8.0.17147";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://download.teamviewer.com/download/teamviewer_linux_x64.deb";
|
2013-11-18 20:37:40 +01:00
|
|
|
sha256 = "0s5m15f99rdmspzwx3gb9mqd6jx1bgfm0d6rfd01k9rf7gi7qk0k";
|
2013-03-22 12:41:16 +01:00
|
|
|
};
|
|
|
|
|
2013-11-18 20:37:40 +01:00
|
|
|
buildInputs = [ makeWrapper patchelf ];
|
2013-03-22 12:41:16 +01: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-21 00:25:23 +01:00
|
|
|
$out/share/teamviewer8/tv_bin/script/teamviewer "\$@"
|
2013-03-22 12:41:16 +01:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/teamviewer
|
2013-11-18 20:37:40 +01:00
|
|
|
|
|
|
|
patchelf --set-rpath "${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer8/tv_bin/teamviewerd
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/share/teamviewer8/tv_bin/teamviewerd
|
|
|
|
ln -s $out/share/teamviewer8/tv_bin/teamviewerd $out/bin/
|
2013-03-22 12:41:16 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://www.teamviewer.com";
|
|
|
|
license = "unfree";
|
|
|
|
description = "Desktop sharing application, providing remote support and online meetings";
|
|
|
|
};
|
|
|
|
}
|