From dfccd873126a28e35e271da691232c64da290cff Mon Sep 17 00:00:00 2001 From: thomasjm Date: Mon, 10 Aug 2026 16:24:58 -0700 Subject: [PATCH] ark: set R_LIBS_SITE to fix detection of installed packges --- pkgs/by-name/ar/ark/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ar/ark/package.nix b/pkgs/by-name/ar/ark/package.nix index fbdbed890c23..015bf5ffaf52 100644 --- a/pkgs/by-name/ar/ark/package.nix +++ b/pkgs/by-name/ar/ark/package.nix @@ -38,10 +38,12 @@ rustPlatform.buildRustPackage (finalAttrs: { doCheck = false; # Ark loads R dynamically at runtime, locating it via `R_HOME` or by running - # `R RHOME`. Put R on PATH so the kernel works out of the box. + # `R RHOME`. Put R on PATH so the kernel works out of the box. Also set + # R_LIBS_SITE so that ark can find installed packages. postInstall = '' wrapProgram $out/bin/ark \ - --suffix PATH : ${lib.makeBinPath [ R ]} + --suffix PATH : ${lib.makeBinPath [ R ]} \ + --prefix R_LIBS_SITE : "$(${lib.getExe' R "Rscript"} -e 'cat(Sys.getenv("R_LIBS_SITE"))')" ''; meta = {