nixpkgs/pkgs
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
..
applications RStudio: Optionally allow packages from custom R environment 2017-01-27 18:54:50 -05:00
build-support Add a pkgs.dhallToNix utility 2017-01-26 20:11:49 -08:00
data gentium: fix source url 2017-01-26 03:52:49 +01:00
desktops apacheHttpd_2_2: remove 2017-01-27 15:33:54 +01:00
development RStudio: Optionally allow packages from custom R environment 2017-01-27 18:54:50 -05:00
games chocolate-doom: 2.2.1 -> 2.3.0 2017-01-25 18:54:18 -08:00
misc gxemul: get rid of composableDerivation 2017-01-27 17:36:38 +01:00
os-specific libnl: 3.2.23 -> 2.3.29 to revert accidental downgrade. 2017-01-27 22:41:44 +00:00
servers Merge pull request #22124 from mayflower/feature/frab 2017-01-27 17:15:05 +01:00
shells tcsh: 6.19.00 -> 6.20.00 2017-01-26 03:52:49 +01:00
stdenv Merge pull request #22117 from dezgeg/aarch64-for-merge 2017-01-26 17:52:28 +02:00
test
tools fix eval 2017-01-27 18:53:49 +01:00
top-level rustRegistry: 2017-01-08 -> 2017-01-27 2017-01-27 22:07:34 +01:00