3
0
Fork 0
forked from mirrors/nixpkgs
Nix Packages collection
Go to file
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
.github CONTRIBUTING.md: switch to a link that actually works 2016-11-24 10:01:16 +01:00
doc Merge pull request #22101 from zimbatm/no-md5 2017-01-25 09:07:48 +01:00
lib Merge pull request #22117 from dezgeg/aarch64-for-merge 2017-01-26 17:52:28 +02:00
maintainers update.nix moved to maintainers/scripts/update.nix 2016-12-18 16:45:33 +01:00
nixos Merge pull request #22124 from mayflower/feature/frab 2017-01-27 17:15:05 +01:00
pkgs RStudio: Optionally allow packages from custom R environment 2017-01-27 18:54:50 -05:00
.editorconfig Do not trim trailing whitespace in patch files 2017-01-12 23:44:26 +01:00
.gitignore kde5: consolidate packages into desktops/kde-5 2016-03-01 10:36:00 -06:00
.mention-bot include me in mention bot for darwin 2016-12-09 21:19:32 +01:00
.travis.yml travis: also evaluate nixpkgs-unstable 2016-12-15 22:43:14 +01:00
.version unstable is now 17.03 2016-09-02 08:47:21 +02:00
COPYING Time passing by 2017-01-01 21:35:52 +01:00
default.nix Separate fix-point from config importing hacks and other impurities 2016-07-14 14:33:23 -07:00
README.md README: Update to 16.09 2016-10-04 17:45:24 +02:00

logo

Build Status Code Triagers Badge

Nixpkgs is a collection of packages for the Nix package manager. It is periodically built and tested by the hydra build daemon as so-called channels. To get channel information via git, add nixpkgs-channels as a remote:

% git remote add channels git://github.com/NixOS/nixpkgs-channels.git

For stability and maximum binary package support, it is recommended to maintain custom changes on top of one of the channels, e.g. nixos-16.09 for the latest release and nixos-unstable for the latest successful build of master:

% git remote update channels
% git rebase channels/nixos-16.09

For pull-requests, please rebase onto nixpkgs master.

NixOS linux distribution source code is located inside nixos/ folder.

Communication: