-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
51 lines (50 loc) · 1.94 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This file was generated by the {rix} R package v0.5.1.9000 on 2024-02-21
# with following call:
# >rix(r_ver = "8ad5e8132c5dcf977e308e7bf5517cc6cc0bf7d8",
# > r_pkgs = c("targets",
# > "tarchetypes",
# > "rmarkdown"),
# > system_pkgs = "pandoc",
# > git_pkgs = list(list(package_name = "housing",
# > repo_url = "https://github.com/rap4all/housing/",
# > branch_name = "fusen",
# > commit = "1c860959310b80e67c41f7bbdc3e84cef00df18e")),
# > ide = "other",
# > project_path = ".",
# > overwrite = TRUE,
# > shell_hook = "Rscript -e 'targets::tar_make()'")
# It uses nixpkgs' revision 8ad5e8132c5dcf977e308e7bf5517cc6cc0bf7d8 for reproducibility purposes
# which will install R version 4.2.2
# Report any issues to https://github.com/b-rodrigues/rix
let
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/8ad5e8132c5dcf977e308e7bf5517cc6cc0bf7d8.tar.gz") {};
rpkgs = builtins.attrValues {
inherit (pkgs.rPackages) targets tarchetypes rmarkdown;
};
git_archive_pkgs = [(pkgs.rPackages.buildRPackage {
name = "housing";
src = pkgs.fetchgit {
url = "https://github.com/rap4all/housing/";
branchName = "fusen";
rev = "1c860959310b80e67c41f7bbdc3e84cef00df18e";
sha256 = "sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4=";
};
propagatedBuildInputs = builtins.attrValues {
inherit (pkgs.rPackages) dplyr ggplot2 janitor purrr readxl rlang rvest stringr tidyr;
};
}) ];
system_packages = builtins.attrValues {
inherit (pkgs) R glibcLocales nix pandoc;
};
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 rpkgs system_packages ];
shellHook = "Rscript -e 'targets::tar_make()'";
}