about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorAlex Branham <alex.branham@gmail.com>2020-04-25 09:39:43 -0400
committerAlex Branham <alex.branham@gmail.com>2020-04-26 17:06:07 -0400
commit8ce6552d6470b79df7aacdbd9f6faa307e24da86 (patch)
tree9e359048481a3d4ef5abca0133e1aaeb48a88d77 /pkgs/applications/science
parentc351f2877ccc24e02bf46b446f01f19f1b4e34cf (diff)
downloadnixlib-8ce6552d6470b79df7aacdbd9f6faa307e24da86.tar
nixlib-8ce6552d6470b79df7aacdbd9f6faa307e24da86.tar.gz
nixlib-8ce6552d6470b79df7aacdbd9f6faa307e24da86.tar.bz2
nixlib-8ce6552d6470b79df7aacdbd9f6faa307e24da86.tar.lz
nixlib-8ce6552d6470b79df7aacdbd9f6faa307e24da86.tar.xz
nixlib-8ce6552d6470b79df7aacdbd9f6faa307e24da86.tar.zst
nixlib-8ce6552d6470b79df7aacdbd9f6faa307e24da86.zip
R: 3.6.3 -> 4.0.0
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/math/R/0001-Disable-test-pending-upstream-fix.patch26
-rw-r--r--pkgs/applications/science/math/R/default.nix15
-rw-r--r--pkgs/applications/science/math/R/fix-failing-test.patch25
3 files changed, 31 insertions, 35 deletions
diff --git a/pkgs/applications/science/math/R/0001-Disable-test-pending-upstream-fix.patch b/pkgs/applications/science/math/R/0001-Disable-test-pending-upstream-fix.patch
deleted file mode 100644
index 7bf32df0b7a3..000000000000
--- a/pkgs/applications/science/math/R/0001-Disable-test-pending-upstream-fix.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 85ede2cf452800710de136f4f864921d3bb9773c Mon Sep 17 00:00:00 2001
-From: Tom Hall <tahall256@protonmail.ch>
-Date: Fri, 21 Feb 2020 22:56:06 +0000
-Subject: [PATCH] Disable test pending upstream fix
-
-See https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17718
----
- tests/reg-tests-1d.R | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/reg-tests-1d.R b/tests/reg-tests-1d.R
-index 9b551a1fc8..18ce6027ed 100644
---- a/tests/reg-tests-1d.R
-+++ b/tests/reg-tests-1d.R
-@@ -3079,7 +3079,7 @@ stopifnot(exprs = {
-     x[1:52] %% 3 == 2:1
-    -x[1:52] %% 3 == 1:2
- }) # larger x suffer from cancellation (well, warning too early now):
--tools::assertWarning(x[60:68] %% 3)
-+#tools::assertWarning(x[60:68] %% 3)
- 
- 
- ## Hilmar Berger's on R-devel list: 'data.frame() == NULL' etc
--- 
-2.24.1
-
diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix
index 617a18265371..52da3b4a1ac9 100644
--- a/pkgs/applications/science/math/R/default.nix
+++ b/pkgs/applications/science/math/R/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, bzip2, gfortran, libX11, libXmu, libXt, libjpeg, libpng
-, libtiff, ncurses, pango, pcre, perl, readline, tcl, texLive, tk, xz, zlib
+, libtiff, ncurses, pango, pcre2, perl, readline, tcl, texLive, tk, xz, zlib
 , less, texinfo, graphviz, icu, pkgconfig, bison, imake, which, jdk, blas, lapack
 , curl, Cocoa, Foundation, libobjc, libcxx, tzdata, fetchpatch
 , withRecommendedPackages ? true
@@ -12,27 +12,24 @@
 assert (!blas.isILP64) && (!lapack.isILP64);
 
 stdenv.mkDerivation rec {
-  name = "R-3.6.3";
+  name = "R-4.0.0";
 
   src = fetchurl {
-    url = "https://cran.r-project.org/src/base/R-3/${name}.tar.gz";
-    sha256 = "13xaxwfbzj0bd6rn2n27z0n04lb93mcyq991w4vdbbg8v282jc49";
+    url = "https://cran.r-project.org/src/base/R-4/${name}.tar.gz";
+    sha256 = "0h1995smlyiyhx7gpg9paxsfqrcn6g9bbp5h9r47i6an3clv1gh6";
   };
 
   dontUseImakeConfigure = true;
 
   buildInputs = [
     bzip2 gfortran libX11 libXmu libXt libXt libjpeg libpng libtiff ncurses
-    pango pcre perl readline texLive xz zlib less texinfo graphviz icu
+    pango pcre2 perl readline texLive xz zlib less texinfo graphviz icu
     pkgconfig bison imake which blas lapack curl tcl tk jdk
   ] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa Foundation libobjc libcxx ];
 
   patches = [
     ./no-usr-local-search-paths.patch
-  ] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch64 [
-    # Remove a test which fails on aarch64.
-    # See https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17718
-    ./0001-Disable-test-pending-upstream-fix.patch
+    ./fix-failing-test.patch
   ];
 
   prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
diff --git a/pkgs/applications/science/math/R/fix-failing-test.patch b/pkgs/applications/science/math/R/fix-failing-test.patch
new file mode 100644
index 000000000000..5fb3b3b9c317
--- /dev/null
+++ b/pkgs/applications/science/math/R/fix-failing-test.patch
@@ -0,0 +1,25 @@
+From e8f54bc562eb301d204b5f880614be58a2b39a2b Mon Sep 17 00:00:00 2001
+From: maechler <maechler@00db46b3-68df-0310-9c12-caf00c1e9a41>
+Date: Mon, 30 Mar 2020 19:15:59 +0000
+Subject: [PATCH] no longer fail in norm() check for broken OpenBLAS Lapack
+ 3.9.0
+
+git-svn-id: https://svn.r-project.org/R/trunk@78112 00db46b3-68df-0310-9c12-caf00c1e9a41
+---
+ tests/reg-tests-1d.R | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/reg-tests-1d.R b/tests/reg-tests-1d.R
+index 6b7de765a95..fafd6911e7a 100644
+--- a/tests/reg-tests-1d.R
++++ b/tests/reg-tests-1d.R
+@@ -3836,7 +3836,8 @@ stopifnot(is.na( norm(diag(c(1, NA)), "2") ))
+ ## norm(<matrix-w-NA>, "F")
+ (m <- cbind(0, c(NA, 0), 0:-1))
+ nTypes <- eval(formals(base::norm)$type) # "O" "I" "F" "M" "2"
+-stopifnot(is.na( print(vapply(nTypes, norm, 0., x = m)) )) # print(): show NA *or* NaN
++print( # stopifnot( -- for now, as Lapack is still broken in some OpenBLAS -- FIXME
++    is.na( print(vapply(nTypes, norm, 0., x = m)) )) # print(): show NA *or* NaN
+ ## "F" gave non-NA with LAPACK 3.9.0, before our patch in R-devel and R-patched
+ 
+