summary refs log tree commit diff
path: root/pkgs/applications/networking/remote
diff options
context:
space:
mode:
authorRaymond Gauthier <jraygauthier@gmail.com>2021-09-30 15:19:50 -0400
committerRaymond Gauthier <jraygauthier@gmail.com>2021-09-30 16:08:36 -0400
commit506966d15658d8a411f364f47bbc0f3f9366dba3 (patch)
tree060fe03e1e4429f5bfcb83155616d3c515acd218 /pkgs/applications/networking/remote
parentf1132b0ff1e3b7f4fc3a8dfece06607854c7fbaa (diff)
downloadnixpkgs-506966d15658d8a411f364f47bbc0f3f9366dba3.tar
nixpkgs-506966d15658d8a411f364f47bbc0f3f9366dba3.tar.gz
nixpkgs-506966d15658d8a411f364f47bbc0f3f9366dba3.tar.bz2
nixpkgs-506966d15658d8a411f364f47bbc0f3f9366dba3.tar.lz
nixpkgs-506966d15658d8a411f364f47bbc0f3f9366dba3.tar.xz
nixpkgs-506966d15658d8a411f364f47bbc0f3f9366dba3.tar.zst
nixpkgs-506966d15658d8a411f364f47bbc0f3f9366dba3.zip
teamviewer: fix issue #96633
Fix teamviewer's breakage post 15.5.3 -> 15.15.5.

Teamviewer client was no longer able to connect to its backing
server as it now uses dbus to do so. Following changes were
required:

 -  add missing dbus and polkit service/policy files to package.
 -  add missing dbus lib to `LD_LIBRARY_PATH`.

Changes to the nixos module as a separate changeset.
Diffstat (limited to 'pkgs/applications/networking/remote')
-rw-r--r--pkgs/applications/networking/remote/teamviewer/default.nix32
1 files changed, 27 insertions, 5 deletions
diff --git a/pkgs/applications/networking/remote/teamviewer/default.nix b/pkgs/applications/networking/remote/teamviewer/default.nix
index 1b564e8daf4..f1da4c91274 100644
--- a/pkgs/applications/networking/remote/teamviewer/default.nix
+++ b/pkgs/applications/networking/remote/teamviewer/default.nix
@@ -38,6 +38,27 @@ mkDerivation rec {
     ln -s /var/log/teamviewer $out/share/teamviewer/logfiles
     ln -s ${xdg-utils}/bin $out/share/teamviewer/tv_bin/xdg-utils
 
+    declare in_script_dir="./opt/teamviewer/tv_bin/script"
+
+    install -d "$out/share/dbus-1/services"
+    install -m 644 "$in_script_dir/com.teamviewer.TeamViewer.service" "$out/share/dbus-1/services"
+    substituteInPlace "$out/share/dbus-1/services/com.teamviewer.TeamViewer.service" \
+      --replace '/opt/teamviewer/tv_bin/TeamViewer' \
+        "$out/share/teamviewer/tv_bin/TeamViewer"
+    install -m 644 "$in_script_dir/com.teamviewer.TeamViewer.Desktop.service" "$out/share/dbus-1/services"
+    substituteInPlace "$out/share/dbus-1/services/com.teamviewer.TeamViewer.Desktop.service" \
+      --replace '/opt/teamviewer/tv_bin/TeamViewer_Desktop' \
+        "$out/share/teamviewer/tv_bin/TeamViewer_Desktop"
+
+    install -d "$out/share/dbus-1/system.d"
+    install -m 644 "$in_script_dir/com.teamviewer.TeamViewer.Daemon.conf" "$out/share/dbus-1/system.d"
+
+    install -d "$out/share/polkit-1/actions"
+    install -m 644 "$in_script_dir/com.teamviewer.TeamViewer.policy" "$out/share/polkit-1/actions"
+    substituteInPlace "$out/share/polkit-1/actions/com.teamviewer.TeamViewer.policy" \
+      --replace '/opt/teamviewer/tv_bin/script/execscript' \
+        "$out/share/teamviewer/tv_bin/script/execscript"
+
     for i in 16 20 24 32 48 256; do
       size=$i"x"$i
 
@@ -52,16 +73,17 @@ mkDerivation rec {
     substituteInPlace $out/share/teamviewer/tv_bin/script/tvw_config \
       --replace '/var/run/' '/run/'
 
-    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 ]}"
-    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 ]}"
+    wrapProgram $out/share/teamviewer/tv_bin/script/teamviewer --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 dbus ]}"
+    wrapProgram $out/share/teamviewer/tv_bin/teamviewerd --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 dbus ]}"
+    wrapProgram $out/share/teamviewer/tv_bin/TeamViewer --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 dbus ]}"
+    wrapProgram $out/share/teamviewer/tv_bin/TeamViewer_Desktop --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [libXrandr libX11 libXext libXdamage libXtst libSM libXfixes dbus ]}"
 
     wrapQtApp $out/share/teamviewer/tv_bin/script/teamviewer
     wrapQtApp $out/bin/teamviewer
   '';
 
   dontStrip = true;
+  dontWrapQtApps = true;
   preferLocalBuild = true;
 
   meta = with lib; {
@@ -69,6 +91,6 @@ mkDerivation rec {
     license = licenses.unfree;
     description = "Desktop sharing application, providing remote support and online meetings";
     platforms = [ "x86_64-linux" ];
-    maintainers = with maintainers; [ jagajaga dasuxullebt ];
+    maintainers = with maintainers; [ jagajaga dasuxullebt jraygauthier ];
   };
 }