From 205e5a55fd18f30a3a1e6ec4b4f0b80ef123fd5f Mon Sep 17 00:00:00 2001 From: detroyejr Date: Sat, 9 Nov 2024 11:38:47 -0500 Subject: [PATCH] R: patchelf libraries missing libR.so --- pkgs/applications/science/math/R/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix index f2825e13568a..33ea13322db6 100644 --- a/pkgs/applications/science/math/R/default.nix +++ b/pkgs/applications/science/math/R/default.nix @@ -101,7 +101,10 @@ stdenv.mkDerivation (finalAttrs: { # The store path to "which" is baked into src/library/base/R/unix/system.unix.R, # but Nix cannot detect it as a run-time dependency because the installed file # is compiled and compressed, which hides the store path. - postFixup = "echo ${which} > $out/nix-support/undetected-runtime-dependencies"; + postFixup = '' + echo ${which} > $out/nix-support/undetected-runtime-dependencies + ${lib.optionalString stdenv.hostPlatform.isLinux ''find $out -name "*.so" -exec patchelf {} --add-rpath $out/lib/R/lib \;''} + ''; doCheck = true; preCheck = "export HOME=$TMPDIR; export TZ=CET; bin/Rscript -e 'sessionInfo()'";