Nixpkgs: Teamviewer package is broken

Created on 13 Jan 2016  ·  13Comments  ·  Source: NixOS/nixpkgs

nixos-version 15.09.911.53286a8 (Dingo)

How to reproduce

  1. Set the following in nixpkgs.config:
    teamviewer10.sha256 = "10risay1a5a85ijbjaz2vxqbfxygpxslvh0dvzz32k988hr9p1gk"; teamviewer10.url = "http://download.teamviewer.com/download/version_10x/teamviewer_amd64.deb";
  2. Set services.teamviewer.enable = true;
  3. Run nixos-rebuild switch
  4. Run teamviewer
  5. Observe something like
    '/nix/store/5mjhg48hih71cp7grddjc9hkv7jf6s1k-teamviewer-10.0.37742/share/teamviewer/tv_bin/script/tvw_exec: Zeile 33: /nix/store/5mjhg48hih71cp7grddjc9hkv7jf6s1k-teamviewer-10.0.37742/share/teamviewer/tv_bin/wine/bin/wineserver: No such file or directory'

    Expected

Full functional teamviewer UI

All 13 comments

cc @abbradar

I suppose we need to backport my patches for TeamViewer 11 to 15.09, but this is a breaking change -- older TeamViewer versions would be gone. What do you think?

@abbradar note that TeamViewer 11 (nixpkgs-unstable) also seems to have a problem:

sudo teamviewer --daemon start

systemctl start teamviewerd.service
Failed to start teamviewerd.service: Unit teamviewerd.service failed to load: No such file or directory.
fail

Hm, it works for me with services.teamviewer.enable:

 nixpkgs git:(stable) ✗ systemctl status teamviewerd
● teamviewerd.service - TeamViewer remote control daemon
   Loaded: loaded (/nix/store/ja506lgqkdmvfkp9q8i64mvxmqdz86jl-unit-teamviewerd.service/teamviewerd.service; bad; vendor preset: enabled)
   Active: active (running) since Wed 2016-01-13 22:22:04 MSK; 42s ago
  Process: 18435 ExecStart=/nix/store/9v0zqxkppb04g8296xwsygrvx8b36myj-teamviewer-11.0.52520/bin/teamviewerd -d (code=exited, status=0/SUCCESS)
  Process: 18431 ExecStartPre=/nix/store/px21k4y8ysi52ra96ag01r9f2hi7l16k-unit-script/bin/teamviewerd-pre-start (code=exited, status=0/SUCCESS)
 Main PID: 18437 (teamviewerd)
   CGroup: /system.slice/teamviewerd.service
           └─18437 /nix/store/9v0zqxkppb04g8296xwsygrvx8b36myj-teamviewer-11.0.52520/bin/teamviewerd -d...

Jan 13 22:22:04 abbradarbook systemd[1]: Starting TeamViewer remote control daemon...
Jan 13 22:22:04 abbradarbook systemd[1]: teamviewerd.service: PID file /run/teamviewerd.pid not rea...tory
Jan 13 22:22:04 abbradarbook systemd[1]: Started TeamViewer remote control daemon.
Hint: Some lines were ellipsized, use -l to show in full.

Perhaps you tried to install teamviewer from nixpkgs-unstable in the environment, without taking corresponding service from nixos-unstable?

That could be the reason. How can I pick the service from nixos-unstable?

@abbradar what would a backport of your changes to nixos 15.09 break? Can't we just introduce 11.nix?
Anyway, even if older tv versions would be gone when backporting it's still the better option IMO. I mean what's the alternative?

@2chilled Picking a service can be done via combination of imports and nixpkgs.config.packagesOverride (to take newer teamviewer versions). Anyway, I've pushed the update to release-15.09 branch.

Thanks @abbradar ! Can't wait til it's available.

Once again regarding my question:
Would it have been possible to use your teamviewer 11 version from nixpkgs-unstable while staying on the 15.09 channel? If so, how is this done? This would mean one can install different packages from different channels simultaneously using the global configuration.nix

Yes, packages can be installed seamlessly, but with NixOS modules it can get tricky, because we need to "remove" existing module from the configuration tree and I don't know any way to do this.

Example configuration for overriding packages with ones from another channel:

{ config, pkgs, ... }:
  let unstablePkgs = import <nixos-unstable> { };
  in {
    nixpkgs.config.packageOverrides = self: {
      teamviewer = unstablePkgs.teamviewer;
    };
  }

For non-overlapping (non-existent in your current channel) or your custom NixOS modules:

{ config, pkgs, ... }:
  {
    require = [ <nixos-unstable/nixos/modules/services/new-module.nix> ];
  }

For replacing existing NixOS modules (as in your case) I would recommend to instead make your own nixpkgs tree and pick needed patches with git:

git clone -b nixos-15.09 https://github.com/NixOS/nixpkgs-channels nixpkgs
cd nixpkgs
git remote add upstream https://github.com/NixOS/nixpkgs
git fetch upstream
git cherry-pick <commit-1> <commit-2> <commit-3> # cherry-pick needed updates from unstable
nixos-rebuild switch -I nixpkgs=$(pwd)

Great, thanks!

@abbradar Great Comment! That comment should be somewhere prominently in the documentation!

We can make a new package for portable teamviewer: https://github.com/NixOS/nixpkgs/issues/26137

Was this page helpful?
0 / 5 - 0 ratings