summaryrefslogtreecommitdiffstats
path: root/pkgs/development/r-modules
diff options
context:
space:
mode:
authorNathan Viets <nathan.g.viets@gmail.com>2023-03-02 19:37:27 -0500
committerNathan Viets <nathan.g.viets@gmail.com>2023-03-07 18:23:26 +0100
commit2f430da1c6aaeb4306427b77f139f53dcd729e08 (patch)
treeadbee68b51a283ba4beea0fc9176ddb7a75a824e /pkgs/development/r-modules
parent022f8093322f2d5a291d219f272167003504ba64 (diff)
Replacing MRAN mirror with posit
Diffstat (limited to 'pkgs/development/r-modules')
-rw-r--r--pkgs/development/r-modules/default.nix4
-rwxr-xr-xpkgs/development/r-modules/generate-r-packages.R6
-rw-r--r--pkgs/development/r-modules/generate-shell.nix1
3 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix
index 7cfb8e54f275..6d6814e3f66a 100644
--- a/pkgs/development/r-modules/default.nix
+++ b/pkgs/development/r-modules/default.nix
@@ -68,9 +68,9 @@ let
hydraPlatforms = [];
};
deriveCran = mkDerive {
- mkHomepage = {name, snapshot, ...}: "http://mran.revolutionanalytics.com/snapshot/${snapshot}/web/packages/${name}/";
+ mkHomepage = {name, snapshot, ...}: "https://cran.r-project.org/${snapshot}/web/packages/${name}/";
mkUrls = {name, version, snapshot}: [
- "http://mran.revolutionanalytics.com/snapshot/${snapshot}/src/contrib/${name}_${version}.tar.gz"
+ "https://packagemanager.rstudio.com/cran/${snapshot}/src/contrib/${name}_${version}.tar.gz"
];
};
diff --git a/pkgs/development/r-modules/generate-r-packages.R b/pkgs/development/r-modules/generate-r-packages.R
index 8c97c651e4c4..0b01c09a278e 100755
--- a/pkgs/development/r-modules/generate-r-packages.R
+++ b/pkgs/development/r-modules/generate-r-packages.R
@@ -1,5 +1,6 @@
#!/usr/bin/env Rscript
library(data.table)
+library(jsonlite)
library(parallel)
library(BiocManager)
cl <- makeCluster(10)
@@ -11,12 +12,13 @@ if ("release" %in% biocVersion$BiocStatus) {
} else {
biocVersion <- max(as.numeric(as.character(biocVersion$Bioc)))
}
-snapshotDate <- Sys.Date()-1
+dates <- stream_in(url("https://packagemanager.rstudio.com/__api__/repos/2/transaction-dates"), verbose = FALSE)
+snapshotDate <- as.Date(dates[nrow(dates), "alias"])
mirrorUrls <- list( bioc=paste0("http://bioconductor.statistik.tu-dortmund.de/packages/", biocVersion, "/bioc/src/contrib/")
, "bioc-annotation"=paste0("http://bioconductor.statistik.tu-dortmund.de/packages/", biocVersion, "/data/annotation/src/contrib/")
, "bioc-experiment"=paste0("http://bioconductor.statistik.tu-dortmund.de/packages/", biocVersion, "/data/experiment/src/contrib/")
- , cran=paste0("http://mran.revolutionanalytics.com/snapshot/", snapshotDate, "/src/contrib/")
+ , cran=paste0("https://packagemanager.rstudio.com/cran/", snapshotDate, "/src/contrib/")
)
mirrorType <- commandArgs(trailingOnly=TRUE)[1]
diff --git a/pkgs/development/r-modules/generate-shell.nix b/pkgs/development/r-modules/generate-shell.nix
index 1c96cf05cb54..0ab3d6fb557f 100644
--- a/pkgs/development/r-modules/generate-shell.nix
+++ b/pkgs/development/r-modules/generate-shell.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation {
(rWrapper.override {
packages = with rPackages; [
data_table
+ jsonlite
parallel
BiocManager
];