fixed R.nvim

This commit is contained in:
Daniel Winkler 2026-05-12 15:58:31 +10:00
commit 07d2156dfb
7 changed files with 65 additions and 7 deletions

View file

@ -46,7 +46,7 @@
nix = true;
optional = false;
python = false;
r = false;
r = true;
};
settings = {
lang_packages = {
@ -199,7 +199,8 @@
zk
];
shellPackages = [nvimPkg]
shellPackages =
[nvimPkg]
++ pkgs.lib.optionals cfg.cats.python pythonPackages
++ pkgs.lib.optionals cfg.cats.r rPackages
++ pkgs.lib.optionals cfg.cats.julia juliaPackages
@ -210,7 +211,13 @@
packages = shellPackages;
nativeBuildInputs = with pkgs; [] ++ (pkgs.lib.optionals cfg.cats.optional [devenv]);
inputsFrom = [];
shellHook = "";
shellHook = ''
echo 'I am a NixShell'
export R_HOME=$(R RHOME)
export R_LIBS_SITE=$(strings "$(command -v R)" | grep -oP '/nix/store/[^:]+/library' | sort -u | paste -sd: -)
export R_LIBS_USER="$PWD/.r-libs"
mkdir -p "$R_LIBS_USER"
'';
};
}
);