summary refs log tree commit diff
path: root/pkgs/applications/science/math
diff options
context:
space:
mode:
authorKarn Kallio <kkallio@skami.org>2015-10-01 02:37:49 -0430
committerPeter Simons <simons@cryp.to>2015-10-02 22:15:14 +0200
commit87b75c33ced7a6c34e303662ac9658efaa880218 (patch)
tree3751460da87920c2a4972a779216d07750f029f4 /pkgs/applications/science/math
parent30187392239b492b34a7df2ba996aef573ccf0d3 (diff)
downloadnixlib-87b75c33ced7a6c34e303662ac9658efaa880218.tar
nixlib-87b75c33ced7a6c34e303662ac9658efaa880218.tar.gz
nixlib-87b75c33ced7a6c34e303662ac9658efaa880218.tar.bz2
nixlib-87b75c33ced7a6c34e303662ac9658efaa880218.tar.lz
nixlib-87b75c33ced7a6c34e303662ac9658efaa880218.tar.xz
nixlib-87b75c33ced7a6c34e303662ac9658efaa880218.tar.zst
nixlib-87b75c33ced7a6c34e303662ac9658efaa880218.zip
R: advance to version 3.2.2.
A test failing without recommended packages has been patched.
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r--pkgs/applications/science/math/R/default.nix7
-rw-r--r--pkgs/applications/science/math/R/fix-tests-without-recommended-packages.patch24
2 files changed, 28 insertions, 3 deletions
diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix
index 0f13faf7513e..79bfef08bb50 100644
--- a/pkgs/applications/science/math/R/default.nix
+++ b/pkgs/applications/science/math/R/default.nix
@@ -6,11 +6,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "R-3.2.1";
+  name = "R-3.2.2";
 
   src = fetchurl {
     url = "http://cran.r-project.org/src/base/R-3/${name}.tar.gz";
-    sha256 = "d59dbc3f04f4604a5cf0fb210b8ea703ef2438b3ee65fd5ab536ec5234f4c982";
+    sha256 = "07a6s865bjnh7w0fqsrkv1pva76w99v86w0w787qpdil87km54cw";
   };
 
   buildInputs = [ bzip2 gfortran libX11 libXmu libXt
@@ -19,7 +19,8 @@ stdenv.mkDerivation rec {
     which jdk openblas
   ];
 
-  patches = [ ./no-usr-local-search-paths.patch ];
+  patches = [ ./no-usr-local-search-paths.patch
+              ./fix-tests-without-recommended-packages.patch ];
 
   preConfigure = ''
     configureFlagsArray=(
diff --git a/pkgs/applications/science/math/R/fix-tests-without-recommended-packages.patch b/pkgs/applications/science/math/R/fix-tests-without-recommended-packages.patch
new file mode 100644
index 000000000000..c736c7098a30
--- /dev/null
+++ b/pkgs/applications/science/math/R/fix-tests-without-recommended-packages.patch
@@ -0,0 +1,24 @@
+diff -Naur R-3.2.2-upstream/tests/reg-packages.R R-3.2.2/tests/reg-packages.R
+--- R-3.2.2-upstream/tests/reg-packages.R	2015-08-05 17:45:05.000000000 -0430
++++ R-3.2.2/tests/reg-packages.R	2015-10-01 02:11:05.484992903 -0430
+@@ -82,7 +82,8 @@
+ ## pkgB tests an empty R directory
+ dir.create(file.path(pkgPath, "pkgB", "R"), recursive = TRUE,
+ 	   showWarnings = FALSE)
+-p.lis <- if("Matrix" %in% row.names(installed.packages(.Library)))
++matrixIsInstalled <- "Matrix" %in% row.names(installed.packages(.Library))
++p.lis <- if(matrixIsInstalled)
+ 	     c("pkgA", "pkgB", "exNSS4") else "exNSS4"
+ for(p. in p.lis) {
+     cat("building package", p., "...\n")
+@@ -111,8 +112,8 @@
+   tools::assertError(is.null(pkgA:::nilData))
+ }
+ 
+-if(dir.exists(file.path("myLib", "exNSS4"))) {
+-    for(ns in c("pkgB", "pkgA", "Matrix", "exNSS4")) unloadNamespace(ns)
++if(matrixIsInstalled && dir.exists(file.path("myLib", "exNSS4"))) {
++    for(ns in c(rev(p.lis), "Matrix")) unloadNamespace(ns)
+     ## Both exNSS4 and Matrix define "atomicVector" *the same*,
+     ## but  'exNSS4'  has it extended - and hence *both* are registered in cache -> "conflicts"
+     requireNamespace("exNSS4", lib= "myLib")