diff --git a/pkgs/applications/networking/remote/teamviewer/default.nix b/pkgs/applications/networking/remote/teamviewer/default.nix index 17e7bdaf1a91..266a80e19e59 100644 --- a/pkgs/applications/networking/remote/teamviewer/default.nix +++ b/pkgs/applications/networking/remote/teamviewer/default.nix @@ -72,19 +72,19 @@ mkDerivation rec { --replace '/lib64/ld-linux-x86-64.so.2' '${glibc.out}/lib/ld-linux-x86-64.so.2' 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 dbus ]}" - wrapProgram $out/share/teamviewer/tv_bin/teamviewerd \ - --prefix PATH : "${lib.makeBinPath [ getconf ]}" \ - --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 ]}" + makeWrapperArgs = [ + "--prefix PATH : ${lib.makeBinPath [ getconf ]}" + "--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 + postFixup = '' + wrapProgram $out/share/teamviewer/tv_bin/teamviewerd ''${makeWrapperArgs[@]} + # tv_bin/script/teamviewer runs tvw_main which runs tv_bin/TeamViewer + wrapProgram $out/share/teamviewer/tv_bin/script/teamviewer ''${makeWrapperArgs[@]} ''${qtWrapperArgs[@]} + wrapProgram $out/share/teamviewer/tv_bin/teamviewer-config ''${makeWrapperArgs[@]} ''${qtWrapperArgs[@]} + wrapProgram $out/share/teamviewer/tv_bin/TeamViewer_Desktop ''${makeWrapperArgs[@]} ''${qtWrapperArgs[@]} ''; dontStrip = true;