Skip to content

Commit

Permalink
Merge pull request #22817 from jbedo/r
Browse files Browse the repository at this point in the history
R: 3.2.4 -> 3.3.2
  • Loading branch information
domenkozar committed Feb 27, 2017
2 parents 7ed28a0 + 4c2d75f commit 4ccb553
Show file tree
Hide file tree
Showing 8 changed files with 6,662 additions and 4,698 deletions.
12 changes: 4 additions & 8 deletions pkgs/applications/science/math/R/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
}:

stdenv.mkDerivation rec {
name = "R-3.2.4";
name = "R-3.3.2";

src = fetchurl {
url = "http://cran.r-project.org/src/base/R-3/${name}.tar.gz";
sha256 = "0l6k3l3cy6fa9xkn23zvz5ykpw10s45779x88yz3pzn2x5gl1zds";
sha256 = "0k2i9qdd83g09fcpls2198q4ykxkii5skczb514gnx7mx4hsv56j";
};

buildInputs = [ bzip2 gfortran libX11 libXmu libXt
Expand All @@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optionals (!stdenv.isDarwin) [ tcl tk ]
++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa Foundation cf-private libobjc ];

patches = [ ./no-usr-local-search-paths.patch ];
patches = [ ./no-usr-local-search-paths.patch ./zlib-version-check.patch ];

preConfigure = ''
configureFlagsArray=(
Expand All @@ -35,10 +35,6 @@ stdenv.mkDerivation rec {
--with-libpng
--with-jpeglib
--with-libtiff
--with-system-zlib
--with-system-bzlib
--with-system-pcre
--with-system-xz
--with-ICU
${stdenv.lib.optionalString enableStrictBarrier "--enable-strict-barrier"}
--enable-R-shlib
Expand Down Expand Up @@ -69,7 +65,7 @@ stdenv.mkDerivation rec {

installTargets = [ "install" "install-info" "install-pdf" ];

doCheck = true;
doCheck = withRecommendedPackages;

enableParallelBuilding = true;

Expand Down
20 changes: 20 additions & 0 deletions pkgs/applications/science/math/R/zlib-version-check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/configure b/configure
index cf368ce..dc528ff 100755
--- a/configure
+++ b/configure
@@ -35507,10 +35507,11 @@ else
#include <string.h>
#include <zlib.h>
int main() {
-#ifdef ZLIB_VERSION
-/* Work around Debian bug: it uses 1.2.3.4 even though there was no such
- version on the master site zlib.net */
- exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0);
+#ifdef ZLIB_VERNUM
+ if (ZLIB_VERNUM < 0x01250) {
+ exit(1);
+ }
+ exit(0);
#else
exit(1);
#endif
482 changes: 252 additions & 230 deletions pkgs/development/r-modules/bioc-annotation-packages.nix

Large diffs are not rendered by default.

552 changes: 294 additions & 258 deletions pkgs/development/r-modules/bioc-experiment-packages.nix

Large diffs are not rendered by default.

2,315 changes: 1,211 additions & 1,104 deletions pkgs/development/r-modules/bioc-packages.nix

Large diffs are not rendered by default.

7,689 changes: 4,874 additions & 2,815 deletions pkgs/development/r-modules/cran-packages.nix

Large diffs are not rendered by default.

280 changes: 0 additions & 280 deletions pkgs/development/r-modules/default.nix

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions pkgs/development/r-modules/generate-r-packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ library(parallel)
cl <- makeCluster(10)

rVersion <- paste(R.Version()$major, strsplit(R.Version()$minor, ".", fixed=TRUE)[[1]][1], sep=".")
snapshotDate <- Sys.Date()
snapshotDate <- Sys.Date()-1

mirrorUrls <- list( bioc=paste0("http://bioconductor.statistik.tu-dortmund.de/packages/", rVersion, "/bioc/src/contrib/")
, "bioc-annotation"=paste0("http://bioconductor.statistik.tu-dortmund.de/packages/", rVersion, "/data/annotation/src/contrib/")
Expand Down Expand Up @@ -45,16 +45,20 @@ nixPrefetch <- function(name, version) {
}

formatPackage <- function(name, version, sha256, depends, imports, linkingTo) {
name <- ifelse(name == "import", "r_import", name)
attr <- gsub(".", "_", name, fixed=TRUE)
options(warn=5)
depends <- paste( if (is.na(depends)) "" else gsub("[ \t\n]+", "", depends)
, if (is.na(imports)) "" else gsub("[ \t\n]+", "", imports)
, if (is.na(linkingTo)) "" else gsub("[ \t\n]+", "", linkingTo)
, sep=","
)
depends <- unlist(strsplit(depends, split=",", fixed=TRUE))
depends <- sapply(depends, gsub, pattern="([^ \t\n(]+).*", replacement="\\1")
depends <- sapply(depends, gsub, pattern=".", replacement="_", fixed=TRUE)
depends <- lapply(depends, gsub, pattern="([^ \t\n(]+).*", replacement="\\1")
depends <- lapply(depends, gsub, pattern=".", replacement="_", fixed=TRUE)
depends <- depends[depends %in% knownPackages]
depends <- lapply(depends, function(d) ifelse(d == "import", "r_import", d))
depends <- paste(depends)
depends <- paste(sort(unique(depends)), collapse=" ")
paste0(" ", attr, " = derive2 { name=\"", name, "\"; version=\"", version, "\"; sha256=\"", sha256, "\"; depends=[", depends, "]; };")
}
Expand Down

0 comments on commit 4ccb553

Please sign in to comment.