git.iko.soy/typeable/nixpkgs
on master help sign in
R: fix build on aarch64 by removing a failing test

I believe this test is currently incorrect on aarch64 and expects a warning about loss of precision with much smaller numbers than the platform's long doubles can handle.

commitae9e09a2e1ee1d003074b888a5cccd30faf93b03 authorTom Hall <tahall256@protonmail.ch> dateFri 21 Feb 2020, 23:01 (7 years ago) parent4e5aeca
2 files changed+30
pkgs/applications/science/math/R/0001-Disable-test-pending-upstream-fix.patch+26 pkgs/applications/science/math/R/default.nix+4
pkgs/applications/science/math/R/0001-Disable-test-pending-upstream-fix.patchnew file+26
@@ -0,0 +1,26 @@
1+From 85ede2cf452800710de136f4f864921d3bb9773c Mon Sep 17 00:00:00 2001
2+From: Tom Hall <tahall256@protonmail.ch>
3+Date: Fri, 21 Feb 2020 22:56:06 +0000
4+Subject: [PATCH] Disable test pending upstream fix
5+
6+See https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17718
7+---
8+ tests/reg-tests-1d.R | 2 +-
9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/tests/reg-tests-1d.R b/tests/reg-tests-1d.R
12+index 9b551a1fc8..18ce6027ed 100644
13+--- a/tests/reg-tests-1d.R
14++++ b/tests/reg-tests-1d.R
15+@@ -3079,7 +3079,7 @@ stopifnot(exprs = {
16+ x[1:52] %% 3 == 2:1
17+ -x[1:52] %% 3 == 1:2
18+ }) # larger x suffer from cancellation (well, warning too early now):
19+-tools::assertWarning(x[60:68] %% 3)
20++#tools::assertWarning(x[60:68] %% 3)
21+
22+
23+ ## Hilmar Berger's on R-devel list: 'data.frame() == NULL' etc
24+--
25+2.24.1
26+
pkgs/applications/science/math/R/default.nix+4
@@ -27,6 +27,10 @@ stdenv.mkDerivation rec {
2727
2828 patches = [
2929 ./no-usr-local-search-paths.patch
30+ ] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch64 [
31+ # Remove a test which fails on aarch64.
32+ # See https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17718
33+ ./0001-Disable-test-pending-upstream-fix.patch
3034 ];
3135
3236 prePatch = stdenv.lib.optionalString stdenv.isDarwin ''