You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default.nix 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. { mkDerivation, lib, fetchurl, autoPatchelfHook, makeWrapper, xdg_utils, dbus
  2. , qtbase, qtwebkit, qtx11extras, qtquickcontrols, glibc
  3. , libXrandr, libX11, libXext, libXdamage, libXtst, libSM, libXfixes
  4. , wrapQtAppsHook
  5. }:
  6. mkDerivation rec {
  7. pname = "teamviewer";
  8. version = "14.6.2452";
  9. src = fetchurl {
  10. url = "https://dl.tvcdn.de/download/linux/version_14x/teamviewer_${version}_amd64.deb";
  11. sha256 = "0j677bqwvlczbja9msayqpdgandb2mvyvcr0vasc3hhnmnk70ahw";
  12. };
  13. unpackPhase = ''
  14. ar x $src
  15. tar xf data.tar.*
  16. '';
  17. nativeBuildInputs = [ autoPatchelfHook makeWrapper wrapQtAppsHook ];
  18. buildInputs = [ dbus qtbase qtwebkit qtx11extras libX11 ];
  19. propagatedBuildInputs = [ qtquickcontrols ];
  20. installPhase = ''
  21. mkdir -p $out/share/teamviewer $out/bin $out/share/applications
  22. cp -a opt/teamviewer/* $out/share/teamviewer
  23. rm -R \
  24. $out/share/teamviewer/logfiles \
  25. $out/share/teamviewer/config \
  26. $out/share/teamviewer/tv_bin/xdg-utils \
  27. $out/share/teamviewer/tv_bin/script/{teamviewer_setup,teamviewerd.sysv,teamviewerd.service,teamviewerd.*.conf,libdepend,tv-delayed-start.sh}
  28. ln -s $out/share/teamviewer/tv_bin/script/teamviewer $out/bin
  29. ln -s $out/share/teamviewer/tv_bin/teamviewerd $out/bin
  30. ln -s $out/share/teamviewer/tv_bin/desktop/com.teamviewer.*.desktop $out/share/applications
  31. ln -s /var/lib/teamviewer $out/share/teamviewer/config
  32. ln -s /var/log/teamviewer $out/share/teamviewer/logfiles
  33. ln -s ${xdg_utils}/bin $out/share/teamviewer/tv_bin/xdg-utils
  34. sed -i "s,/opt/teamviewer,$out/share/teamviewer,g" $out/share/teamviewer/tv_bin/desktop/com.teamviewer.*.desktop
  35. substituteInPlace $out/share/teamviewer/tv_bin/script/tvw_aux \
  36. --replace '/lib64/ld-linux-x86-64.so.2' '${glibc.out}/lib/ld-linux-x86-64.so.2'
  37. substituteInPlace $out/share/teamviewer/tv_bin/script/tvw_config \
  38. --replace '/var/run/' '/run/'
  39. wrapProgram $out/share/teamviewer/tv_bin/script/teamviewer --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 ]}"
  40. wrapProgram $out/share/teamviewer/tv_bin/teamviewerd --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 ]}"
  41. wrapProgram $out/share/teamviewer/tv_bin/TeamViewer --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 ]}"
  42. wrapProgram $out/share/teamviewer/tv_bin/TeamViewer_Desktop --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [libXrandr libX11 libXext libXdamage libXtst libSM libXfixes ]}"
  43. wrapQtApp $out/bin/teamviewer
  44. '';
  45. dontStrip = true;
  46. preferLocalBuild = true;
  47. meta = with lib; {
  48. homepage = http://www.teamviewer.com;
  49. license = licenses.unfree;
  50. description = "Desktop sharing application, providing remote support and online meetings";
  51. platforms = [ "x86_64-linux" ];
  52. maintainers = with maintainers; [ jagajaga dasuxullebt ];
  53. };
  54. }