File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ # To enable this shell run nix-shell from the command line and you will be
2+ # dropped into a shell with the necessary packages installed to compile this
3+ # site.
4+ #
5+ # NOTE If you encounter errors with the stringi library, the stackoverflow
6+ # answer https://stackoverflow.com/a/35094828/15291819 provides a solution that
7+ # seems to work, you just need to install stringi with the following command
8+ #
9+ # > install.packages("stringi",
10+ # repos="http://cran.rstudio.com/",
11+ # dependencies=TRUE)
12+ #
13+
14+ let
15+ commitHash = "78dc359abf8217da2499a6da0fcf624b139d7ac3" ;
16+ tarballUrl = "https://github.com/NixOS/nixpkgs/archive/${ commitHash } .tar.gz" ;
17+ pkgs = import ( fetchTarball tarballUrl ) { } ;
18+ stdenv = pkgs . stdenv ;
19+ in with pkgs ; {
20+ myProject = stdenv . mkDerivation {
21+ name = "example-r-env" ;
22+ version = "1" ;
23+ src = if pkgs . lib . inNixShell then null else nix ;
24+
25+ buildInputs = with rPackages ; [
26+ R
27+ dplyr
28+ purrr
29+ magrittr
30+ ggplot2
31+ stringr
32+ pandoc
33+ ] ;
34+ shellHook = ''
35+ printf "\n\nWelcome to a reproducible R shell :)\n\n"
36+ '' ;
37+ } ;
38+ }
You can’t perform that action at this time.
0 commit comments