nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

rstudioWrapper is broken

Open knedlsepp opened this issue 8 years ago • 7 comments

Issue description

rstudio installed via nixpkgs.rstudioWrapper is broken.

Steps to reproduce

$ nix-shell -p rstudioWrapper --pure --run rstudio
This application failed to start because it could not find 
or load the Qt platform plugin "xcb" in "".

Reinstalling the application may fix this problem.

The same goes for installing rstudioEnv as described in the manual. The following does however work:

$ nix-shell -p rstudio --pure --run rstudio

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.9.74, NixOS, 17.09.2630.81373e421e8 (Hummingbird)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 1.11.16
  • channels(sepp): "nixos-17.09-17.09.2498.a9ffb7b0b5a, nixpkgs-17.09.2498.a9ffb7b0b5a"
  • channels(root): ""
  • nixpkgs: /nix/store/k6jyklha15pssnnjnpdzqlgnm5a8gn06-nixexprs.tar.xz

knedlsepp avatar Jan 10 '18 15:01 knedlsepp

Ping @ehmry @changlinli @ciil

knedlsepp avatar Jan 10 '18 15:01 knedlsepp

Problems seems to be due to qt being missing in $PATH for rstudioWrapper. The command:

diff <(nix-shell -p rstudio --run env) <(nix-shell -p rstudioWrapper --run env) | grep "PATH"

shows that /nix/store/x5c1z4v2kyxwl2dgh7r08jq2zxsaar02-qt-5.9.1/bin is on the $PATH for rstudio, but not for rstudioWrapper. Interestingly enough, installing rstudio via: nix-env -iA nixpkgs.rstudio also installs all kinds of qt commands like qmake, but rstudioWrapper doesn't.

knedlsepp avatar Jan 10 '18 15:01 knedlsepp

I'm uncertain if this is the right solution, but moving qt to propagatedBuildInputs of rstudio seems to make it work.

  propagatedBuildInputs = [ qt5.full qt5.qtwebkit qt5.qtwebchannel ];

I suppose that making qt5 a dependency of rstudioWrapper might also work. Which one is the right solution?

knedlsepp avatar Jan 11 '18 08:01 knedlsepp

I don't have regular internet access until (hopefully) early next week, so I won't be able to look into it before then. This qt issue might be related to #30551. Could you try again with the workaround from https://github.com/NixOS/nixpkgs/issues/30551#issuecomment-346319767?

ciil avatar Jan 11 '18 09:01 ciil

At first glance making qt5 one of the propagatedBuildInputs of rstudio doesn't seem wrong. It's a bit heavy-handed vs making it a dependency of the wrapper directly, but I'm not sure there's a plausible world where dependencies of rstudio use a version of Qt that's different from the one used by rstudio itself.

changlinli avatar Jan 16 '18 06:01 changlinli

I have confirmed that adding propagatedBuildInputs = [ qtbase qtwebkit qtwebchannel ]; to default.nix does indeed allow rstudio to start as expected.

joncfoo avatar Jan 18 '18 17:01 joncfoo

update: the wrapper seems to be working fine

joncfoo avatar Feb 14 '18 16:02 joncfoo