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

r-modules: add more nix-shell documentation #19533

Merged
merged 1 commit into from
Oct 14, 2016
Merged

r-modules: add more nix-shell documentation #19533

merged 1 commit into from
Oct 14, 2016

Conversation

langston-barrett
Copy link
Contributor

Motivation for this change

A lot of the time, I'd like to share my environments with others. This just adds instructions on how to do that! Essentially taken from #13204.

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
    • OS X
    • Linux
  • 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.

Use nix-shell with a default.nix rather than using config.nix

Use nix-shell with a `default.nix` rather than using
config.nix
@mention-bot
Copy link

@siddharthist, thanks for your PR! By analyzing the history of the files in this pull request, we identified @michelk to be a potential reviewer.

@langston-barrett langston-barrett changed the title r-modules: add more nix-shell r-modules: add more nix-shell documentation Oct 14, 2016
@Mic92 Mic92 merged commit fe518a7 into NixOS:master Oct 14, 2016
@Mic92
Copy link
Member

Mic92 commented Oct 14, 2016

Thanks!

pkgs = import <nixpkgs> {};
stdenv = pkgs.stdenv;
in with pkgs; {
myProject = stdenv.mkDerivation {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use rWrapper.override here as well?

@langston-barrett langston-barrett deleted the r-modules/readme-nix-shell branch October 14, 2016 18:22
@langston-barrett
Copy link
Contributor Author

Just to clarify w/r/t your comment @FRidh, I find this method helpful when I'm mixing R modules and other dependencies (perhaps Sphinx for documentation, Docker for container builds, etc.).

@FRidh
Copy link
Member

FRidh commented Oct 15, 2016

for that purpose we have pkgs.buildEnv, although in practice just using mkDerivation like you did works just as well.

@langston-barrett
Copy link
Contributor Author

@FRidh Thanks for the pointer!

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

Successfully merging this pull request may close these issues.

4 participants