So I see that R packages are quasi-automatically generated from CRAN, the R package repository. But some packages aren’t yet on CRAN, but are only on GitHub. For example, the library nominatim is not yet in nixpkgs, but you can install it in R / RStudio using the devtools library, and running devtools::install_github("hrbrmstr/nominatim")
I’m guessing all that does is grab the package from that GitHub repo, and install it to my local R packages directory.
But it’d be really nice to be able to add GitHub-based R packages to my R module.
My R module currently looks like this:
{ config, lib, pkgs, ... }:
let myRPackages = with pkgs.rPackages;
[
devtools
...
xfun
xml2
];
in {
environment.systemPackages = with pkgs; [
(rWrapper.override { packages = myRPackages; } )
(rstudioWrapper.override { packages = myRPackages; } )
];
}
What would be really nice is to be able to specify additional packages from GitHub, and add them to this module. Is there a way to do that? I’m guessing it’d just be a matter of making a derivation and setting the paths correctly so that R can see the packages where they’re downloaded. But unfortunately I’m not that good at Nix yet, and am pretty lost with thinking about how that would happen. Does anyone have any ideas?