[Nix-dev] Developing R modules with nix

Michel Kuhlmann michel at kuhlmanns.info
Fri Sep 12 12:57:47 CEST 2014


Hi,
I have two issues related to using R with nix:

- Fixing the CRAN-mirror
- a `default.nix`-file for an R-package.

Fixing the CRAN-mirror
----------------------

Currently I have in my `.nixpkgs/config.nix` an entry with

    rToolsEnv = pkgs.buildEnv {
        name = "rTools";
        paths = with rPackages; [
            devtools
            ggplot2
        ];
      };

and I am installing it with `nix-env -i rTools`

Could I somehow fix the CRAN-mirror to use eg.  with
`cranMirror = "http://stat.ethz.ch/CRAN/src/contrib/"`

default.nix
-----------

I'm looking for an example default.nix file, which I can put into my R-package
directory; could someone suggest me a common workflow for developing the R-package?

Thanks, Michel


More information about the nix-dev mailing list