diff options
author | Maciej Kazulak <kazulakm@gmail.com> | 2017-11-03 15:15:01 +0100 |
---|---|---|
committer | Maciej Kazulak <kazulakm@gmail.com> | 2017-11-04 12:26:08 +0100 |
commit | 42b70ae5edccac2c6ca2afb205ace21790850919 (patch) | |
tree | 04776a9abf3ae50e62bef9a44e41c1344c2df6f8 /pkgs/development/r-modules/README.md | |
parent | 9a1534496a0f2d8c6f10ebe7e4c75970d77ef28d (diff) |
nixpkgs manual: add rstudio shell.nix example
Provide an example of a self-contained shell.nix for rstudio with additional packages.
Diffstat (limited to 'pkgs/development/r-modules/README.md')
-rw-r--r-- | pkgs/development/r-modules/README.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/development/r-modules/README.md b/pkgs/development/r-modules/README.md index 477059cbb2c8a..c8f02bd147806 100644 --- a/pkgs/development/r-modules/README.md +++ b/pkgs/development/r-modules/README.md @@ -79,6 +79,23 @@ environment, see `rstudioWrapper`, which functions similarly to Then like above, `nix-env -f "<nixpkgs>" -iA rstudioEnv` will install this into your user profile. +Alternatively, you can create a self-contained `shell.nix` without the need to +modify any configuration files: + +```nix +{ pkgs ? import <nixpkgs> {} +}: + +pkgs.rstudioWrapper.override { + packages = with pkgs.rPackages; [ dplyr ggplot2 reshape2 ]; +} + +``` + +Executing `nix-shell` will then drop you into an environment equivalent to the +one above. If you need additional packages just add them to the list and +re-enter the shell. + ## Updating the package set ```bash |