Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rstudio: 1.1.383 -> 1.1.414 #33901

Merged
merged 1 commit into from Jan 15, 2018
Merged

rstudio: 1.1.383 -> 1.1.414 #33901

merged 1 commit into from Jan 15, 2018

Conversation

sifmelcara
Copy link
Member

@sifmelcara sifmelcara commented Jan 15, 2018

Motivation for this change

Fix build by updating rstudio version.

Old version of rstudio fails to build on current nixpkgs master because it do not support new version of boost. (rstudio/rstudio#1897)

Things done
  1. remove openssl patch. Because the issue have been fixed by upstream
  2. change fetchurl to fetchFromGitHub (GitHub unstable archive tracking issue #32997)
  3. update the version of rstudio, rmarkdown and rsconnect.

cc maintainers @ehmry @changlinli @ciil

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member

Mic92 commented Jan 15, 2018

Thanks!

@joncfoo
Copy link

joncfoo commented Jan 17, 2018

@sifmelcara it doesn't look like rstudio uses the updated rsconnect that you've updated

I'm using the master branch of nixpkgs & installed rstudio via: nix-env -f ~/src/nixpkgs -i -E 'f: let pkgs = (f {system = "x86_64-linux";}); in pkgs.rstudioWrapper.override { packages = [ pkgs.rPackages.PKI pkgs.rPackages.RCurl ]; }'

In the ide I see:

> packageVersion("rsconnect")
[1] ‘0.8.5’

thoughts?

@sifmelcara
Copy link
Member Author

Hmm... It even failed to show the gui on current master.

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.
Aborted

After bisecting, I found it was broken by #33297 being merged into master.
Maybe this issue is also related to #33702 ?

@joncfoo Although I'm not a expert about R and rstudio, I think you may got that 0.8.5 version because you have installed rsconnect in your home directory? (~/R maybe?)
When I tried your command, rstudio simply tells me that rsconnect is not installed.
Also it seems there is no need to manually fetch packages when compiling rstudio anymore.. because upstream have decided to not to install those packages when installing rstudio ( rstudio/rstudio@3198140#diff-a5cf8527025032071e38a684d4b25d01 )

@sifmelcara
Copy link
Member Author

@joncfoo What I tried to say is that rstudio seems not to come with rsconnect and rmarkdown anymore. We should install those packages by install.packages().
https://cran.rstudio.com/web/packages/rsconnect/index.html
And it seems the new version of rsconnect have not been uploaded to CRAN

@Mic92
Copy link
Member

Mic92 commented Jan 18, 2018

@sifmelcara did you install Rstudio in your profile or started it via nix-shell? It could also be, that you have the wrong qt version installed in your profile. Some explanation from @ttuegel #30551 (comment)

@sifmelcara
Copy link
Member Author

@Mic92 I started it by executing nix-build -A rstudio then ./result/bin/rstudio.
So the only correct way to test rstudio is to install it to user profile via nix-env? It indeed works for me.

@sifmelcara
Copy link
Member Author

sifmelcara commented Jan 18, 2018

So I found setting QT_QPA_PLATFORM_PLUGIN_PATH make it work without installing into profile, not sure if this is the correct solution though.

   postInstall = ''
-      wrapProgram $out/bin/rstudio --suffix PATH : ${gnumake}/bin
+      wrapProgram $out/bin/rstudio --suffix PATH : ${gnumake}/bin \
+                                   --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms
       mkdir $out/share
       cp -r ${desktopItem}/share/applications $out/share
       mkdir $out/share/icons

@Mic92
Copy link
Member

Mic92 commented Jan 18, 2018

@sifmelcara yes, you need to use nix-env, home-manager or environment.systemPackages in nixos.
I think there is a reason, we can not just set QT_QPA_PLATFORM_PLUGIN_PATH as it would prevent other plugins from being loaded.

@sifmelcara
Copy link
Member Author

Ok, thank you for the clarification!

@joncfoo
Copy link

joncfoo commented Jan 18, 2018

@sifmelcara thanks for looking into this - I did have rsconnect installed locally as you mentioned.

btw I used propagatedBuildInputs as mentioned in #33702 and got rstudio working. I added the line propagatedBuildInputs = [ qtbase qtwebkit qtwebchannel ];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants