Skip to content

Commit

Permalink
docs; inherit only glibcLocalesUtf8
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Baumann committed Sep 26, 2023
1 parent a57e6a1 commit 08ba8ad
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
12 changes: 11 additions & 1 deletion R/find_rev.R
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,16 @@ fetchpkgs <- function(git_pkgs, archive_pkgs){
#' version 2.2.1 release, then use the Nix revision closest to that date, by setting
#' `r_ver = "3.1.0"`, which was the version of R current at the time. This
#' ensures that Nix builds a completely coherent environment.
#' By default, the nix shell will be configured with `"en_US.UTF-8"` for the
#' relevant locale variables (`LANG`, `LC_ALL`, `LC_TIME`, `LC_MONETARY`,
#' `LC_PAPER`). This is done to ensure locale reproducibility by default
#' in Nix environments. If there are good reasons to not stick to the default,
#' you can set your preferred locale variables via
#' `options(rix.nix_locale_variables = list(LANG = "de_CH.UTF-8", <...>)`
#' and the aforementioned locale variable names. However, you should use
#' UTF-8 locales since we import the `glibcLocalesUtf8` set only, to not
#' download the full set of locales and thereby keep the size reasonably
#' small.
#' @export
rix <- function(r_ver = "latest",
r_pkgs = NULL,
Expand Down Expand Up @@ -456,7 +466,7 @@ tex_pkgs)
# to add it.
generate_system_pkgs <- function(system_pkgs){
sprintf('system_packages = builtins.attrValues {
inherit (pkgs) R glibcLocales %s;
inherit (pkgs) R glibcLocalesUtf8 %s;
};
',
get_system_pkgs(system_pkgs))
Expand Down
12 changes: 11 additions & 1 deletion dev/build_envs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,16 @@ you use another IDE, you can leave the "ide" argument blank:
#' version 2.2.1 release, then use the Nix revision closest to that date, by setting
#' `r_ver = "3.1.0"`, which was the version of R current at the time. This
#' ensures that Nix builds a completely coherent environment.
#' By default, the nix shell will be configured with `"en_US.UTF-8"` for the
#' relevant locale variables (`LANG`, `LC_ALL`, `LC_TIME`, `LC_MONETARY`,
#' `LC_PAPER`). This is done to ensure locale reproducibility by default
#' in Nix environments. If there are good reasons to not stick to the default,
#' you can set your preferred locale variables via
#' `options(rix.nix_locale_variables = list(LANG = "de_CH.UTF-8", <...>)`
#' and the aforementioned locale variable names. However, you should use
#' UTF-8 locales since we import the `glibcLocalesUtf8` set only, to not
#' download the full set of locales and thereby keep the size reasonably
#' small.
#' @export
rix <- function(r_ver = "latest",
r_pkgs = NULL,
Expand Down Expand Up @@ -540,7 +550,7 @@ tex_pkgs)
# to add it.
generate_system_pkgs <- function(system_pkgs){
sprintf('system_packages = builtins.attrValues {
inherit (pkgs) R glibcLocales %s;
inherit (pkgs) R glibcLocalesUtf8 %s;
};
',
get_system_pkgs(system_pkgs))
Expand Down
2 changes: 1 addition & 1 deletion inst/extdata/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let
};
}) ];
system_packages = builtins.attrValues {
inherit (pkgs) R glibcLocales ;
inherit (pkgs) R glibcLocalesUtf8 ;
};
in
pkgs.mkShell {
Expand Down
10 changes: 10 additions & 0 deletions man/rix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 08ba8ad

Please sign in to comment.