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

Clearer docs for usage/installation from nixos (nixpkgs.rPackages.rix??) #350

Open
BlueDrink9 opened this issue Oct 17, 2024 · 2 comments
Open

Comments

@BlueDrink9
Copy link

I feel like I must be missing something - how do you use this project with NixOS? The docs all seem to have a baseline assumption that R is installed, and can install rix. My understanding is that you should only ever install R and packages on NixOS like

  environment.systemPackages = with pkgs; [
    (rWrapper.override{ packages = with rPackages; [
rix
]})]

But rix is not in nixpkgs! For a nix-based tool, that's a confusing omission to me, but I presume there is some logic behind it.

I think the docs would benefit from a clear explanation about how to get bootstrapped with rix on NixOS such that the beginner examples can actually run.

Is the intention that users should install regular R only, then manually install.package("rix")?

@b-rodrigues
Copy link
Contributor

Thanks for opening this issue, there's actually a very good reason the docs are not very clear when it comes to NixOS itself: none of the authors use it 😅

We certainly could benefit from help here.

But rix is not in nixpkgs! For a nix-based tool, that's a confusing omission to me, but I presume there is some logic behind it.

This is because rix only very recently got on CRAN, and the next r tree bump for nixpkgs will happen somewhere beginning of November, because the next R release is scheduled on the 31st of October: R packages for Nix get updated around that time then. So rix will soon be available as a nix package as well!

Is the intention that users should install regular R only, then manually install.package("rix")?

Not at all, actually, in the readme, we explain how to use rix even on a system with R. See: https:/ropensci/rix?tab=readme-ov-file#quick-start-for-returning-users

my advice would even be to only use nix based envs!

@BlueDrink9
Copy link
Author

Ah, that makes a lot of sense, especially the part about CRAN. I'm not super experienced with NixOS, but at some point once it's merged into nixpkgs I'm sure I could put together some instructions for getting it working. In the meanwhile I've adapted it to use a git revision and that seems to be working ok; see https:/BlueDrink9/env/blob/master/system/nix/packages/R.nix

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

No branches or pull requests

2 participants