Skip to content

rix 0.4.0

Choose a tag to compare

@philipp-baumann philipp-baumann released this 26 Sep 15:38

rix 0.4.0 (2023-09-26)

Features

  • rix::rix() now defaults to "en_US.UTF-8" for the relevant locale
    variables (LANG, LC_ALL, LC_TIME, LC_MONETARY, LC_PAPER,
    LC_MEASUREMENT) and sets these environment variables in
    the Nix shell. These will be correctly propagated into the Nix R session.
    Users can modify the locale setting via
    options(rix.nix_locale_variables = list(LANG = "de_CH.UTF-8", <...>), e.g.,
    but it needs to be an UTF-8 locale. This is because we only import the
    glibcLocalesUtf8 subset, to not keep the size reasonable.

Bug fixes

  • fix locale warnings when starting R in linux, which uses glibc (closes
    #50). Now, we use
    glibcLocalesUtf8 from Nix for "x86_64-linux".

Rix: Reproducible Environments with Nix

{rix} is a toolkit in R that eases the creation of reprodublible and isolated R environments using Nix and the Nix Packages collection.

The goal is to enable a frictionless infrastructure-as-code approach for all three major operating systems: linux, macOS and Windows (via WSL2). {nix} equips you with handy helpers so that you can derive a project-based Nix setup without diving too deep into the language and packaging specifics of Nix.

rix() is one of the main functions, which you can use to bootstrap default.nix files by providing these arguments:

  • r_ver: R version or corresponding Nix R revision
  • r_pkgs: R packages and versions from CRAN
  • system_pkgs: any other systems tools available from Nix (e.g. Julia, Rust,
    quarto CLI, etc.)
  • git_pkgs: R packages and versions from GitHub
  • tex_pkgs: Set of LaTeX packages to install
  • ide: interactive development environment; currently we support RStudio,
    VSCode, and "other"
  • shell_hook: Commands added via shellHook that get executed when entering in Nix shell environemnt

A lot of new cool features are underway in upcoming versions. Please check out the
changelog above or NEWS.md for features, bug fixes and eventual changes in new features. The issue tracker is the recommended way to report problems and to follow development plans and progress.