Corrected langpackage installation

This commit is contained in:
Daniel Winkler 2026-05-23 18:41:22 +10:00
commit 10254b11c7
4 changed files with 30 additions and 37 deletions

View file

@ -1,9 +0,0 @@
# nix
- For R.nvim in the Nix wrapper, both RNVIM_COMPLDIR (C server compilation) and a writable R_LIBS_USER directory (nvimcom R package installation) must be configured — fixing only one leaves permission errors in the other. Confidence: 0.65
- For R.nvim writable directories (RNVIM_COMPLDIR, R_LIBS_USER, TMPDIR), prefer project-local paths (e.g., $PWD/.Rlibs) over global cache paths — the cache approach may let the build succeed but still fail at runtime. Confidence: 0.70
- Do not use lib.mkDefault on values consumed by lib.optionals or other boolean-checking functions — mkDefault wraps values in a priority set that fails "expected a Boolean" at evaluation time. Use plain booleans for inline conditionals, reserving mkDefault for module options resolved by the merge system. Confidence: 0.70
# Taste (Continuously Learned by [CommandCode][cmd])
[cmd]: https://commandcode.ai/

2
.gitignore vendored
View file

@ -3,3 +3,5 @@
*.R *.R
.Rlibs .Rlibs
.nvimcom .nvimcom
.commandcode
.commandcode/

View file

@ -1,4 +1,4 @@
# Copyright (c) 2026 Daniel # Copyright (c) 2026 BirdeeHub & Daniel
# Licensed under the MIT license # Licensed under the MIT license
{ {
description = "Daniel's NixCats"; description = "Daniel's NixCats";
@ -39,6 +39,25 @@
wrappers, wrappers,
... ...
} @ inputs: let } @ inputs: let
langPackages = pkgs: {
python = with pkgs.python3Packages; [
duckdb
polars
];
r = (with pkgs.rpkgs.rPackages; [
arrow
broom
data_table
janitor
styler
pkgs.nvimcom
]) ++ [ pkgs.nvimcom ];
julia = [
"DataFramesMeta"
"QuackIO"
];
};
mkWrapperConfig = pkgs: { mkWrapperConfig = pkgs: {
cats = { cats = {
clickhouse = false; clickhouse = false;
@ -52,11 +71,7 @@
r = true; r = true;
}; };
settings = { settings = {
lang_packages = { lang_packages = langPackages pkgs;
python = [];
r = [];
julia = [];
};
}; };
binName = "vv"; binName = "vv";
}; };
@ -125,27 +140,13 @@
pkgs = mkPkgs system; pkgs = mkPkgs system;
nvimPkg = wrapperSettings pkgs; nvimPkg = wrapperSettings pkgs;
pythonPkgs = with pkgs.python3Packages; [ langPkgs = langPackages pkgs;
duckdb
polars
];
rPkgs = (with pkgs.rpkgs.rPackages; [
arrow
broom
data_table
janitor
languageserver
styler
]) ++ [ pkgs.nvimcom ];
juliaPkgs = ["DataFramesMeta" "QuackIO"];
pythonPackages = let pythonPackages = let
python_packages_fn = python_packages_fn =
if pkgs ? basePythonPackages if pkgs ? basePythonPackages
then ps: pkgs.basePythonPackages ps ++ pythonPkgs then ps: pkgs.basePythonPackages ps ++ langPkgs.python
else _: pythonPkgs; else _: langPkgs.python;
in in
with pkgs; [ with pkgs; [
(python3.withPackages python_packages_fn) (python3.withPackages python_packages_fn)
@ -156,7 +157,7 @@
]; ];
rPackages = let rPackages = let
r_packages = (pkgs.baseRPackages or []) ++ rPkgs; r_packages = (pkgs.baseRPackages or []) ++ langPkgs.r;
in in
with pkgs; [ with pkgs; [
(rWrapper.override {packages = r_packages;}) (rWrapper.override {packages = r_packages;})
@ -164,13 +165,12 @@
(quarto.override {extraRPackages = r_packages;}) (quarto.override {extraRPackages = r_packages;})
air-formatter air-formatter
yaml-language-server yaml-language-server
updateR
nvimcom nvimcom
rnvimserver rnvimserver
]; ];
juliaPackages = let juliaPackages = let
julia_with_packages = pkgs.julia-bin.withPackages juliaPkgs; julia_with_packages = pkgs.julia-bin.withPackages langPkgs.julia;
in [julia_with_packages]; in [julia_with_packages];
markdownPackages = with pkgs; [ markdownPackages = with pkgs; [

View file

@ -144,7 +144,7 @@ nmap_leader('gc', '<Cmd>Git commit<CR>', 'Commit')
nmap_leader('gC', '<Cmd>Git commit --amend<CR>', 'Commit amend') nmap_leader('gC', '<Cmd>Git commit --amend<CR>', 'Commit amend')
nmap_leader('gd', '<Cmd>Git diff<CR>', 'Diff') nmap_leader('gd', '<Cmd>Git diff<CR>', 'Diff')
nmap_leader('gD', '<Cmd>Git diff -- %<CR>', 'Diff buffer') nmap_leader('gD', '<Cmd>Git diff -- %<CR>', 'Diff buffer')
nmap_leader('gg', '<Cmd>lua require("neogit").open()<CR>', 'Git tab') nmap_leader("gg", "<cmd>Neogit<cr>", "Open Neogit UI")
nmap_leader('gl', '<Cmd>' .. git_log_cmd .. '<CR>', 'Log') nmap_leader('gl', '<Cmd>' .. git_log_cmd .. '<CR>', 'Log')
nmap_leader('gL', '<Cmd>' .. git_log_cmd .. ' --follow -- %<CR>', 'Log buffer') nmap_leader('gL', '<Cmd>' .. git_log_cmd .. ' --follow -- %<CR>', 'Log buffer')
nmap_leader('go', '<Cmd>lua MiniDiff.toggle_overlay()<CR>', 'Toggle overlay') nmap_leader('go', '<Cmd>lua MiniDiff.toggle_overlay()<CR>', 'Toggle overlay')