Skip to content
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

Merged
merged 1 commit into from Nov 5, 2017
Merged

nixpkgs manual: add rstudio shell.nix example #31192

merged 1 commit into from Nov 5, 2017

Conversation

mulderr
Copy link
Contributor

@mulderr mulderr commented Nov 3, 2017

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

};
};

pkgs = nixpkgsFunc { overlays = [ roverlay ]; };
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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.

@@ -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
Copy link
Member

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.

Copy link
Contributor Author

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.
@peti peti merged commit 37d5539 into NixOS:master Nov 5, 2017
@mulderr
Copy link
Contributor Author

mulderr commented Nov 5, 2017

Thanks for taking the time to review this!

@peti
Copy link
Member

peti commented Nov 5, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants