Skip to content

Commit

Permalink
fixed locales
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Rodrigues committed Sep 25, 2023
1 parent 87edbda commit 28201ac
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion R/detect_os.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ detect_os <- function(){
#' @noRd
generate_locale_archive <- function(os){
if(detect_os() == "Linux"){
'LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";'
'LOCALE_ARCHIVE = \"${pkgs.glibcLocalesUtf8}/lib/locale/locale-archive\";'
} else if(detect_os() == "Darwin") {
''
} else {
Expand Down
2 changes: 1 addition & 1 deletion R/find_rev.R
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ tex_pkgs)
# to add it.
generate_system_pkgs <- function(system_pkgs){
sprintf('system_packages = builtins.attrValues {
inherit (pkgs) R %s;
inherit (pkgs) R glibcLocalesUtf8 %s;
};
',
get_system_pkgs(system_pkgs))
Expand Down
2 changes: 1 addition & 1 deletion dev/build_envs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ tex_pkgs)
# to add it.
generate_system_pkgs <- function(system_pkgs){
sprintf('system_packages = builtins.attrValues {
inherit (pkgs) R %s;
inherit (pkgs) R glibcLocalesUtf8 %s;
};
',
get_system_pkgs(system_pkgs))
Expand Down
2 changes: 1 addition & 1 deletion dev/get_os.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This function adds deals with locale on Linux (and WSL2):
#' generate_locale_archive("Linux")
generate_locale_archive <- function(os){
if(detect_os() == "Linux"){
'LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";'
'LOCALE_ARCHIVE = \"${pkgs.glibcLocalesUtf8}/lib/locale/locale-archive\";'
} else if(detect_os() == "Darwin") {
''
} else {
Expand Down
34 changes: 17 additions & 17 deletions inst/extdata/default.nix
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# This file was generated by the {rix} R package v0.2.1.9002 on 2023-09-10
# This file was generated by the {rix} R package v0.3.1 on 2023-09-25
# with following call:
# >rix(r_ver = "78058d810644f5ed276804ce7ea9e82d92bee293",
# >rix(r_ver = "976fa3369d722e76f37c77493d99829540d43845",
# > r_pkgs = NULL,
# > system_pkgs = "nix",
# > git_pkgs = list(list(package_name = "rix",
# > repo_url = "https://github.com/b-rodrigues/rix",
# > system_pkgs = NULL,
# > git_pkgs = list(package_name = "rix",
# > repo_url = "https://github.com/b-rodrigues/rix/",
# > branch_name = "master",
# > commit = "1bd327c7cf315d22ab69865b6fc96c943cd97bd4")),
# > commit = "ae39d2142461688b1be41db800752a949ebb3c7b"),
# > ide = "other",
# > project_path = dirname(path),
# > overwrite = TRUE,
# > shell_hook = "R --vanilla")
# It uses nixpkgs' revision 78058d810644f5ed276804ce7ea9e82d92bee293 for reproducibility purposes
# which will install R version latest
# > project_path = "inst/extdata",
# > overwrite = TRUE)
# It uses nixpkgs' revision 976fa3369d722e76f37c77493d99829540d43845 for reproducibility purposes
# which will install R as it was as of nixpkgs revision: 976fa3369d722e76f37c77493d99829540d43845
# Report any issues to https://github.com/b-rodrigues/rix
let
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/78058d810644f5ed276804ce7ea9e82d92bee293.tar.gz") {};
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/976fa3369d722e76f37c77493d99829540d43845.tar.gz") {};
git_archive_pkgs = [(pkgs.rPackages.buildRPackage {
name = "rix";
src = pkgs.fetchgit {
url = "https://github.com/b-rodrigues/rix";
url = "https://github.com/b-rodrigues/rix/";
branchName = "master";
rev = "1bd327c7cf315d22ab69865b6fc96c943cd97bd4";
sha256 = "sha256-qi8FXCsKIuoHoERE6ZhTooHH9f94cRIi6mrUVbQU8NY=";
rev = "ae39d2142461688b1be41db800752a949ebb3c7b";
sha256 = "sha256-rOhFnc01CzRE6Hl73xGvaE/bQCoX0d5tZ10jzAoqQ7g=";
};
propagatedBuildInputs = builtins.attrValues {
inherit (pkgs.rPackages) httr jsonlite sys;
};
}) ];
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-basic ;
inherit (pkgs.texlive) scheme-small ;
});
system_packages = builtins.attrValues {
inherit (pkgs) R nix;
inherit (pkgs) R glibcLocalesUtf8 ;
};
in
pkgs.mkShell {
LOCALE_ARCHIVE = "${pkgs.glibcLocalesUtf8}/lib/locale/locale-archive";
buildInputs = [ git_archive_pkgs system_packages ];
shellHook = ''
R --vanilla
Expand Down

0 comments on commit 28201ac

Please sign in to comment.