Skip to content

Commit

Permalink
use nix
Browse files Browse the repository at this point in the history
  • Loading branch information
assignUser committed May 14, 2024
1 parent 6d5d41f commit 6b828ee
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
58 changes: 58 additions & 0 deletions scripts/bm-report/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This file was generated by the {rix} R package v0.6.0 on 2024-05-14
# with following call:
# >rix::rix(r_ver = "abd6d48f8c77bea7dc51beb2adfa6ed3950d2585",
# > r_pkgs = install.packages(c("dplyr",
# > "prettyunits",
# > "ggplot2",
# > "gh",
# > "gt",
# > "hms",
# > "jqr",
# > "jsonlite",
# > "lubridate",
# > "memoise",
# > "plotly",
# > "purrr",
# > "remotes")),
# > system_pkgs = c("quarto"),
# > git_pkgs = list(package_name = "conbenchcoms",
# > repo_url = "https://github.com/conbench/conbenchcoms",
# > branch_name = "main",
# > commit = "55cdb120bbe2c668d3cf8ae543f4922131653645"),
# > ide = "other",
# > project_path = path_default_nix,
# > overwrite = TRUE,
# > print = TRUE)
# It uses nixpkgs' revision abd6d48f8c77bea7dc51beb2adfa6ed3950d2585 for reproducibility purposes
# which will install R version latest
# Report any issues to https://github.com/b-rodrigues/rix
let
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/abd6d48f8c77bea7dc51beb2adfa6ed3950d2585.tar.gz") {};
git_archive_pkgs = [(pkgs.rPackages.buildRPackage {
name = "conbenchcoms";
src = pkgs.fetchgit {
url = "https://github.com/conbench/conbenchcoms";
branchName = "main";
rev = "55cdb120bbe2c668d3cf8ae543f4922131653645";
sha256 = "sha256-XR5+grCUKyvSxsqiOkKd3gMUsWDJblZDmF4O+Jehq6U=";
};
propagatedBuildInputs = builtins.attrValues {
inherit (pkgs.rPackages) dplyr glue httr2 yaml;
};
}) ];
system_packages = builtins.attrValues {
inherit (pkgs) R glibcLocales nix quartoMinimal which;
};
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 ];

}
2 changes: 1 addition & 1 deletion scripts/bm-report/report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ link_times |>
```{r big-objects}
size_formatter <- function() {
function(x) {
gdata::humanReadable(x, standard = "Unix")
prettyunits::pretty_bytes(x)
}
}
Expand Down

0 comments on commit 6b828ee

Please sign in to comment.