about summary refs log tree commit diff
path: root/pkgs/development/r-modules
diff options
context:
space:
mode:
authorSavyasachee Jha <genghizkhan91@hawkradius.com>2023-04-16 16:05:06 +0530
committerSavyasachee Jha <genghizkhan91@hawkradius.com>2023-04-29 18:24:06 +0530
commite7c6fb0f864809b66879d99d77fae9bc7b045fdc (patch)
treedccd03f66063f9b8c92ed2e9ae10c50a1c6b2cb6 /pkgs/development/r-modules
parent580693af1116e892fa8b71c37669511b13b2e2f5 (diff)
downloadnixlib-e7c6fb0f864809b66879d99d77fae9bc7b045fdc.tar
nixlib-e7c6fb0f864809b66879d99d77fae9bc7b045fdc.tar.gz
nixlib-e7c6fb0f864809b66879d99d77fae9bc7b045fdc.tar.bz2
nixlib-e7c6fb0f864809b66879d99d77fae9bc7b045fdc.tar.lz
nixlib-e7c6fb0f864809b66879d99d77fae9bc7b045fdc.tar.xz
nixlib-e7c6fb0f864809b66879d99d77fae9bc7b045fdc.tar.zst
nixlib-e7c6fb0f864809b66879d99d77fae9bc7b045fdc.zip
radianWrapper: Explicitly set R_HOME and always have R in buildInputs
Before this commit, `wrapR = false` (the default) would lead to
situations where the `RHOME` variable would not be found. Adding `--set
R_HOME ${R}/lib/R` so that the wrapper explicitly exports `R_HOME` fixes
this issue. In addition, R is also made part of `buildInputs` by default
so that package loading works correctly.
Diffstat (limited to 'pkgs/development/r-modules')
-rw-r--r--pkgs/development/r-modules/wrapper-radian.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/r-modules/wrapper-radian.nix b/pkgs/development/r-modules/wrapper-radian.nix
index a0a23222b523..898ab1999650 100644
--- a/pkgs/development/r-modules/wrapper-radian.nix
+++ b/pkgs/development/r-modules/wrapper-radian.nix
@@ -12,8 +12,7 @@ runCommand (radian.name + "-wrapper") {
   preferLocalBuild = true;
   allowSubstitutes = false;
 
-  buildInputs = [ radian ] ++ recommendedPackages ++ packages
-    ++ lib.optional wrapR R;
+  buildInputs = [ R radian ] ++ recommendedPackages ++ packages;
 
   nativeBuildInputs = [ makeWrapper ];
 
@@ -27,7 +26,8 @@ runCommand (radian.name + "-wrapper") {
   };
 } (''
   makeWrapper "${radian}/bin/radian" "$out/bin/radian" \
-    --prefix "R_LIBS_SITE" ":" "$R_LIBS_SITE"
+    --prefix "R_LIBS_SITE" ":" "$R_LIBS_SITE" \
+    --set "R_HOME" "${R}/lib/R"
 '' + lib.optionalString wrapR ''
   cd ${R}/bin
   for exe in *; do