-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
Description
library("rix")
rix(
r_ver = "latest",
r_pkgs = "[email protected]",
project_path = ".",
overwrite = TRUE
)
nix_build(project_path = ".")
currently produces this Nix expression
# This file was generated by the {rix} R package v0.12.4 on 2024-10-03
# with following call:
# >rix(r_ver = "1839883cd0068572aed75fb9442b508bbd9ef09c",
# > r_pkgs = "[email protected]",
# > project_path = "_test",
# > overwrite = TRUE)
# It uses nixpkgs' revision 1839883cd0068572aed75fb9442b508bbd9ef09c for reproducibility purposes
# which will install R version latest.
# Report any issues to https://github.com/ropensci/rix
let
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/1839883cd0068572aed75fb9442b508bbd9ef09c.tar.gz") {};
git_archive_pkgs = [
(pkgs.rPackages.buildRPackage {
name = "rlang";
src = pkgs.fetchzip {
url = "https://cran.r-project.org/src/contrib/Archive/rlang/rlang_1.1.3.tar.gz";
sha256 = "sha256-+xSUK2YpQHE0sezKMngihHVKG0r63b6OuJb6136qgRM=";
};
propagatedBuildInputs = builtins.attrValues {
inherit (pkgs.rPackages) ;
};
})
];
system_packages = builtins.attrValues {
inherit (pkgs)
glibcLocales
nix
R;
};
in
pkgs.mkShell {
LOCALE_ARCHIVE = if pkgs.system == "x86_64-linux" then "${pkgs.glibcLocales}/lib/locale/locale-archive" else "";
LANG = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
buildInputs = [ git_archive_pkgs system_packages ];
}
It should be tagged under cran_build_pkgs
. Its the same hashing procedure, but semantically its not a git archive.