fix: add ripgrep to always category and revert shellHook to use rg

This commit is contained in:
Daniel 2026-07-27 00:30:10 +00:00
commit 92bd53feea
2 changed files with 4 additions and 4 deletions

View file

@ -69,9 +69,7 @@
''
+ nixpkgs.lib.optionalString (config.cats.r or false) ''
export R_HOME=$(R RHOME)
# 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_SITE=$(strings "$(command -v R)" | rg -o '/nix/store/[^:]+/library' | sort -u | paste -sd: -)
export R_LIBS_USER="$PWD/.r-libs"
mkdir -p "$R_LIBS_USER"
'';