git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #80759 from Thra11/fix-r

Fix R

commitf4dbf4402b689a7748ed2f0acfdb301a55a4cc30 authorTimo Kaufmann <timokau@zoho.com> dateSun 23 Feb 2020, 23:48 (7 years ago) parentdeb4c21ae9e09a
2 files changed+33−5
pkgs/applications/science/math/R/0001-Disable-test-pending-upstream-fix.patch+26 pkgs/applications/science/math/R/default.nix+7−5
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+7−5
@@ -7,7 +7,6 @@
77# R as of writing does not support outputting both .so and .a files; it outputs:
88# --enable-R-static-lib conflicts with --enable-R-shlib and will be ignored
99, static ? false
10−, javaSupport ? (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64)
1110}:
1211
1312stdenv.mkDerivation rec {
@@ -23,12 +22,15 @@ stdenv.mkDerivation rec {
2322 buildInputs = [
2423 bzip2 gfortran libX11 libXmu libXt libXt libjpeg libpng libtiff ncurses
2524 pango pcre perl readline texLive xz zlib less texinfo graphviz icu
26− pkgconfig bison imake which openblas curl tcl tk
27− ] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa Foundation libobjc libcxx ]
28− ++ stdenv.lib.optional javaSupport jdk;
25+ pkgconfig bison imake which openblas curl tcl tk jdk
26+ ] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa Foundation libobjc libcxx ];
2927
3028 patches = [
3129 ./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
3234 ];
3335
3436 prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
@@ -57,7 +59,7 @@ stdenv.mkDerivation rec {
5759 CC=$(type -p cc)
5860 CXX=$(type -p c++)
5961 FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran"
60− ${stdenv.lib.optionalString javaSupport "JAVA_HOME=\"${jdk}\""}
62+ JAVA_HOME="${jdk}"
6163 RANLIB=$(type -p ranlib)
6264 R_SHELL="${stdenv.shell}"
6365 '' + stdenv.lib.optionalString stdenv.isDarwin ''