Skip to contents

The code below generates the default.nix file included in the package at inst/extdata. You can use the call below in case you want to generate an environment with rix only.

The latest commit gets used automatically:

library(rix)

latest_commit <- tryCatch(
  expr = {
    sys::as_text(
      sys::exec_internal("git", c("rev-parse", "master"))$stdout
    )
  },
  # if it fails, use this commit instead
  error = function(e) "4d96207e7f69cbadca5349e9caa5bcc4059c1dc3"
)

rix(r_ver = "latest",
    r_pkgs = NULL,
    system_pkgs = NULL,
    git_pkgs = list(
      package_name = "rix",
      repo_url = "https://github.com/b-rodrigues/rix/",
      branch_name = "master",
      commit = latest_commit
    ),
    ide = "other",
    # path is "./vignettes/" so need to go one up
    project_path = "../inst/extdata",
    overwrite = TRUE,
    shell_hook = NULL)