From e7c6fb0f864809b66879d99d77fae9bc7b045fdc Mon Sep 17 00:00:00 2001 From: Savyasachee Jha Date: Sun, 16 Apr 2023 16:05:06 +0530 Subject: 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. --- pkgs/development/r-modules/wrapper-radian.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkgs/development/r-modules') diff --git a/pkgs/development/r-modules/wrapper-radian.nix b/pkgs/development/r-modules/wrapper-radian.nix index a0a23222b5232..898ab19996506 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 -- cgit 1.4.1