From ad26b17b8caf50bb8c14fc07b555c474ecc4cf0b Mon Sep 17 00:00:00 2001 From: Daniel <22460147+dwinkler1@users.noreply.github.com> Date: Mon, 27 Jul 2026 00:28:43 +0000 Subject: [PATCH] fix: avoid ripgrep dependency in devShell R_LIBS_SITE hook --- flake.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index db14f58..d55ec6f 100644 --- a/flake.nix +++ b/flake.nix @@ -69,7 +69,9 @@ '' + nixpkgs.lib.optionalString (config.cats.r or false) '' export R_HOME=$(R RHOME) - export R_LIBS_SITE=$(strings "$(command -v R)" | rg -o '/nix/store/[^:]+/library' | sort -u | paste -sd: -) + # Use R itself to discover the library paths, avoiding a dependency on + # ripgrep/strings/grep in the devShell PATH. + export R_LIBS_SITE=$(Rscript -e 'cat(.libPaths(), sep = ":")') export R_LIBS_USER="$PWD/.r-libs" mkdir -p "$R_LIBS_USER" '';