Commit Graph

9 Commits

Author SHA1 Message Date
Chris Hodapp
7638578342 RStudio: Optionally allow packages from custom R environment
https://nixos.org/nixpkgs/manual/#r-packages contains a method for
setting up an R environment with a specific set of libraries, and it
creates an R wrapper which points R to those libraries.

The package RStudio relies on the standard R package, which then
cannot access any of the libraries specified in a custom R
environment.  While one may easily use pkgs.rstudio.override to change
rstudio's R dependency to the custom R environment, this accomplishes
nothing because while RStudio runs the correct R wrapper it clears out
the environment variable R_LIBS_SITE - and so it is still unable to
use any of those packages.

In order to work around this problem, these changes allow the user to
optionally modify rstudio's wrapper to set environment variable
R_PROFILE_USER to an R script which sets R's .libPaths(..) to point to
the same libraries; that script is generated from R_LIBS_SITE in the R
wrapper.

By default, this change has no effect.  If R is overridden to
something else, and if useRPackages is changed from its default of
false, then the change described above is made; for instance:

{
  packageOverrides = pkgs: let self = pkgs.pkgs; in
  rec {
    rEnv = pkgs.rWrapper.override {
      packages = with self.rPackages; [
        dplyr ggplot2 e1071 rpart reshape
      ];
    };
    rstudioEnv = pkgs.rstudio.override { R = rEnv; useRPackages = true; };
  };
}
2017-01-27 18:54:50 -05:00
Laverne Schrock
9872e65037 rstudio: make mkDerivation recursive
Needed since we want to access desktopItem from postInstall.
2016-12-22 08:16:49 -06:00
Laverne Schrock
4154adb128 rstudio: add desktop file
Fixes #20230
2016-12-22 08:15:56 -06:00
Emery Hemingway
2b6dcdfcd0 Rename 'emery' maintainer handle to 'ehmry', fixes #11493
Communication happens on Github so names should be consistent.
2015-12-05 23:06:20 +01:00
mucaho
d0d953d910 rstudio: add run-time dependency gnumake
fixes #9163.
2015-10-25 16:18:21 +01:00
Peter Simons
9ce41e3fa0 rstudio: fix Emacs syntax highlighting 2015-03-25 19:34:45 +01:00
Emery Hemingway
a3de8552b0 RStudio: initial commit at version 0.98.110 2015-03-25 19:34:45 +01:00
Domen Kožar
58b4f11242 Revert "RStudio: initial commit at version 0.98.110"
This reverts commit 56e21d05e8.

It's missing a file, see https://github.com/NixOS/nixpkgs/pull/6957
2015-03-25 10:02:08 +01:00
Emery Hemingway
56e21d05e8 RStudio: initial commit at version 0.98.110 2015-03-23 16:28:33 -04:00