aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/r-modules/README.md
diff options
context:
space:
mode:
authorMaciej Kazulak <kazulakm@gmail.com>2017-11-03 15:15:01 +0100
committerMaciej Kazulak <kazulakm@gmail.com>2017-11-04 12:26:08 +0100
commit42b70ae5edccac2c6ca2afb205ace21790850919 (patch)
tree04776a9abf3ae50e62bef9a44e41c1344c2df6f8 /pkgs/development/r-modules/README.md
parent9a1534496a0f2d8c6f10ebe7e4c75970d77ef28d (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.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/development/r-modules/README.md b/pkgs/development/r-modules/README.md
index 477059cbb2c8..c8f02bd14780 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