Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teamviewer v9 #4542

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions pkgs/applications/networking/remote/teamviewer/9.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{ stdenv, fetchurl, libX11, libXtst, libXext, libXdamage, libXfixes, wineUnstable, makeWrapper, libXau
, bash, patchelf }:

let
topath = "${wineUnstable}/bin";

toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib")
[ stdenv.gcc.gcc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]);
in
stdenv.mkDerivation {
name = "teamviewer-9.0.32150";
src = fetchurl {
url = "http://download.teamviewer.com/download/version_9x/teamviewer_linux_x64.deb";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hash will change with every new teamviewer update :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my work is just copy-paste of version 8 with replacing it with 9.
It works. I know it could be better but i figured i'll make pull request so others wont have to do manual work which i did.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you do something similar to pkgs/games/planetaryannihilation/default.nix? So user has to set the download url

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding possibility to override hash and url while retaining default one seems really good idea.
I'll try to add it when i'll have at least a little bit of time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks! Then we should do the same for versions 7 and 8.

sha256 = "23e0e12733aba6c04f2d9f6e7ea98c7748c5dc76b07fbdd5a77bd8df415ffc72";
};

buildInputs = [ makeWrapper patchelf ];

unpackPhase = ''
ar x $src
tar xf data.tar.gz
'';

installPhase = ''
mkdir -p $out/share/teamviewer9 $out/bin
cp -a opt/teamviewer9/* $out/share/teamviewer9
rm -R $out/share/teamviewer9/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}
$out/share/teamviewer9/tv_bin/script/teamviewer "\$@"
EOF
chmod +x $out/bin/teamviewer

patchelf --set-rpath "${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer9/tv_bin/teamviewerd
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/share/teamviewer9/tv_bin/teamviewerd
ln -s $out/share/teamviewer9/tv_bin/teamviewerd $out/bin/
'';

meta = {
homepage = "http://www.teamviewer.com";
license = stdenv.lib.licenses.unfree;
description = "Desktop sharing application, providing remote support and online meetings";
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2371,6 +2371,8 @@ let
# Work In Progress: it doesn't start unless running a daemon as root
teamviewer8 = lowPrio (callPackage_i686 ../applications/networking/remote/teamviewer/8.nix { });

teamviewer9 = lowPrio (callPackage_i686 ../applications/networking/remote/teamviewer/9.nix { });

telnet = callPackage ../tools/networking/telnet { };

texmacs = callPackage ../applications/editors/texmacs {
Expand Down