New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixpkgs manual: add rstudio shell.nix example #31192
Conversation
pkgs/development/r-modules/README.md
Outdated
}; | ||
}; | ||
|
||
pkgs = nixpkgsFunc { overlays = [ roverlay ]; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you define an overlay if all you ever use from the modified package set is just one attribute? That seems unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I need to properly read the manual before I submit changes ;) Sorry if it's not up to the standard. I will try to simplify it more. Do you think an example similar this should be in the manual at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, examples are great, so I'm all for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, gotcha. Ineed it was way more complicated than it needed to be. Hope this is better.
pkgs/development/r-modules/README.md
Outdated
@@ -79,6 +79,30 @@ environment, see `rstudioWrapper`, which functions similarly to | |||
Then like above, `nix-env -f "<nixpkgs>" -iA rstudioEnv` will install | |||
this into your user profile. | |||
|
|||
Alternatively, if you would rather not polute your environement or want |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the term "pollute" is inappropriate here. You don't pollute an environment by installing packages into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... agreed. Not the best wording. I was trying to refer to the fact with the current example you need to go and modify some configuration files, most likely your config.nix and you may want different things for different projects. I'll update that paragraph to make it clear and use less opinionated terms.
Provide an example of a self-contained shell.nix for rstudio with additional packages.
Thanks for taking the time to review this! |
You are welcome. And thanks to you for the contribution!
|
Provide an example of a self-contained shell.nix to setup an environment with custom R packages and RStudio.
Motivation for this change
This could help people new to nix to quickly get started with a working RStudio setup without looking for the right configuration files to modify or people who like to keep all the configuration within each project like myself.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)