anchor.diff:  
     mkLdPath = ps: lib.makeLibraryPath (with ps; [ qt4 dbus alsaLib ]);
   
  -  deps = ps: (with ps; [ dbus alsaLib fontconfig freetype libpng12 libjpeg ]) ++ (with ps.xlibs; [ libX11 libXext libXdamage libXrandr libXrender libXfixes libSM libXtst ]);
  +  deps = ps: (with ps; [ dbus zlib alsaLib fontconfig freetype libpng12 libjpeg ]) ++ (with ps.xlibs; [ libX11 libXext libXdamage libXrandr libXrender libXfixes libSM libXtst libXinerama]);
     tvldpath32 = lib.makeLibraryPath (with pkgsi686Linux; [ qt4 "$out/share/teamviewer/tv_bin/wine" ] ++ deps pkgsi686Linux);
     tvldpath64 = lib.makeLibraryPath (deps pkgs);
   in
  
positive.code: 
      sed -i "s,/opt/teamviewer,$out/share/teamviewer,g" desktop/com.teamviewer.*.desktop
  
      for i in teamviewer-config teamviewerd TeamViewer_Desktop TVGuiDelegate TVGuiSlave.32 wine/bin/*; do
        echo "patching $i"
        patchelf --set-interpreter $(cat ${ld32}) --set-rpath ${tvldpath32} $i || true
      done
      for i in resources/*.so wine/drive_c/TeamViewer/tvwine.dll.so wine/lib/*.so* wine/lib/wine/*.so; do
        echo "patching $i"
        patchelf --set-rpath ${tvldpath32} $i || true
      done
      ${if stdenv.system == "x86_64-linux" then ''
        patchelf --set-interpreter $(cat ${ld64}) --set-rpath ${tvldpath64} TVGuiSlave.64
  
negative.code:     license = licenses.unfree;
      description = "Desktop sharing application, providing remote support and online meetings";
      platforms = [ "i686-linux" "x86_64-linux" ];
      maintainers = with maintainers; [ jagajaga dasuxullebt ];
    };
  }
  