Merge pull request #146378 from smaret/fix-R

R: fix build on Darwin
This commit is contained in:
Michael Raskin 2021-11-17 10:39:06 +00:00 committed by GitHub
commit 8f47107a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,11 +33,15 @@ stdenv.mkDerivation rec {
./no-usr-local-search-paths.patch
];
# Test of the examples for package 'tcltk' fails in Darwin sandbox. See:
# https://github.com/NixOS/nixpkgs/issues/146131
prePatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace configure \
--replace "-install_name libRblas.dylib" "-install_name $out/lib/R/lib/libRblas.dylib" \
--replace "-install_name libRlapack.dylib" "-install_name $out/lib/R/lib/libRlapack.dylib" \
--replace "-install_name libR.dylib" "-install_name $out/lib/R/lib/libR.dylib"
substituteInPlace tests/Examples/Makefile.in \
--replace "test-Examples: test-Examples-Base" "test-Examples:" # do not test the examples
'';
dontDisableStatic = static;