Skip to content

Commit 0c59695

Browse files
authored
R: patchelf libraries missing libR.so (NixOS#354819)
2 parents 43e8808 + 205e5a5 commit 0c59695

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkgs/applications/science/math/R/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ stdenv.mkDerivation (finalAttrs: {
101101
# The store path to "which" is baked into src/library/base/R/unix/system.unix.R,
102102
# but Nix cannot detect it as a run-time dependency because the installed file
103103
# is compiled and compressed, which hides the store path.
104-
postFixup = "echo ${which} > $out/nix-support/undetected-runtime-dependencies";
104+
postFixup = ''
105+
echo ${which} > $out/nix-support/undetected-runtime-dependencies
106+
${lib.optionalString stdenv.hostPlatform.isLinux ''find $out -name "*.so" -exec patchelf {} --add-rpath $out/lib/R/lib \;''}
107+
'';
105108

106109
doCheck = true;
107110
preCheck = "export HOME=$TMPDIR; export TZ=CET; bin/Rscript -e 'sessionInfo()'";

0 commit comments

Comments
 (0)