mirror of
https://github.com/dwinkler1/nvimConfig.git
synced 2026-05-22 12:03:31 -04:00
moved r-nvim to flake build
This commit is contained in:
parent
07d2156dfb
commit
1055522af9
9 changed files with 54 additions and 37 deletions
5
.Rprofile
Normal file
5
.Rprofile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
if (Sys.getenv("RNVIM_TMPDIR") == "") {
|
||||||
|
options(defaultPackages = c("utils", "grDevices", "graphics", "stats", "methods"))
|
||||||
|
} else {
|
||||||
|
options(defaultPackages = c("utils", "grDevices", "graphics", "stats", "methods", "nvimcom"))
|
||||||
|
}
|
||||||
0
.r-tmp/R.nvim-daniel/globenv_1202824815
Normal file
0
.r-tmp/R.nvim-daniel/globenv_1202824815
Normal file
0
.r-tmp/R.nvim-daniel/liblist_1202824815
Normal file
0
.r-tmp/R.nvim-daniel/liblist_1202824815
Normal file
38
flake.lock
generated
38
flake.lock
generated
|
|
@ -22,11 +22,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777954456,
|
"lastModified": 1778443072,
|
||||||
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
"rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -69,6 +69,29 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"r-nvim-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"rixpkgs"
|
||||||
|
],
|
||||||
|
"rnvimsrc": [
|
||||||
|
"plugins-r"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1778638679,
|
||||||
|
"narHash": "sha256-+mdjgYfyNtI/5E6X8uUx3u9qpGC9POS4LagOHSM3Iy0=",
|
||||||
|
"owner": "dwinkler1",
|
||||||
|
"repo": "r_nvim_nix",
|
||||||
|
"rev": "eb784558e18b8f1dead5bd211b96fd287ac1bed7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "dwinkler1",
|
||||||
|
"repo": "r_nvim_nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"rixpkgs": {
|
"rixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771303851,
|
"lastModified": 1771303851,
|
||||||
|
|
@ -80,8 +103,8 @@
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "dwinkler1",
|
"owner": "dwinkler1",
|
||||||
"ref": "nixpkgs",
|
|
||||||
"repo": "rixpkgs",
|
"repo": "rixpkgs",
|
||||||
|
"rev": "af2dd3f7b4b172077747c0869d4e30702fb71b0e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -91,6 +114,7 @@
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"plugins-cmp-pandoc-references": "plugins-cmp-pandoc-references",
|
"plugins-cmp-pandoc-references": "plugins-cmp-pandoc-references",
|
||||||
"plugins-r": "plugins-r",
|
"plugins-r": "plugins-r",
|
||||||
|
"r-nvim-nix": "r-nvim-nix",
|
||||||
"rixpkgs": "rixpkgs",
|
"rixpkgs": "rixpkgs",
|
||||||
"wrappers": "wrappers"
|
"wrappers": "wrappers"
|
||||||
}
|
}
|
||||||
|
|
@ -102,11 +126,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777991014,
|
"lastModified": 1778560014,
|
||||||
"narHash": "sha256-0DS24OW9d9iz+w0LCz6KpS2IpE2z2gHxeBdMZg9xpDY=",
|
"narHash": "sha256-Hu9RMo7vJt/4dx/vAvyG+cE9RBwpaH1ouyunvruYaDI=",
|
||||||
"owner": "BirdeeHub",
|
"owner": "BirdeeHub",
|
||||||
"repo": "nix-wrapper-modules",
|
"repo": "nix-wrapper-modules",
|
||||||
"rev": "dc5184095ad488e937ec308b52c9c0b218959d8b",
|
"rev": "e30aa99c9c7038e16efae3cad7916a47307a9e36",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,11 @@
|
||||||
url = "github:BirdeeHub/nix-wrapper-modules";
|
url = "github:BirdeeHub/nix-wrapper-modules";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
rixpkgs.url = "github:dwinkler1/rixpkgs/nixpkgs";
|
rixpkgs.url = "github:dwinkler1/rixpkgs/af2dd3f7b4b172077747c0869d4e30702fb71b0e";
|
||||||
|
|
||||||
|
r-nvim-nix.url = "github:dwinkler1/r_nvim_nix";
|
||||||
|
r-nvim-nix.inputs.rnvimsrc.follows = "plugins-r";
|
||||||
|
r-nvim-nix.inputs.nixpkgs.follows = "rixpkgs";
|
||||||
|
|
||||||
fran = {
|
fran = {
|
||||||
url = "github:dwinkler1/fran";
|
url = "github:dwinkler1/fran";
|
||||||
|
|
@ -61,6 +65,7 @@
|
||||||
janitor
|
janitor
|
||||||
languageserver
|
languageserver
|
||||||
styler
|
styler
|
||||||
|
pkgs.nvimcom
|
||||||
];
|
];
|
||||||
julia = ["DataFramesMeta" "QuackIO"];
|
julia = ["DataFramesMeta" "QuackIO"];
|
||||||
};
|
};
|
||||||
|
|
@ -187,6 +192,8 @@
|
||||||
air-formatter
|
air-formatter
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
updateR
|
updateR
|
||||||
|
nvimcom
|
||||||
|
rnvimserver
|
||||||
];
|
];
|
||||||
|
|
||||||
juliaPackages = let
|
juliaPackages = let
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
})
|
})
|
||||||
(lib.mkIf (config.cats.r or false) {
|
(lib.mkIf (config.cats.r or false) {
|
||||||
RNVIM_COMPLDIR = "$PWD/.r-compl";
|
RNVIM_COMPLDIR = "$PWD/.r-compl";
|
||||||
R_LIBS_USER = "${pkgs.nvimcom}:$PWD/.Rlibs";
|
R_LIBS_USER = "${pkgs.nvimcom}/library:$PWD/.Rlibs";
|
||||||
TMPDIR = "$PWD/.r-tmp";
|
TMPDIR = "$PWD/.r-tmp";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
# Environment variables with defaults (can be overridden by user)
|
# Environment variables with defaults (can be overridden by user)
|
||||||
config.envDefault = lib.mkMerge [
|
config.envDefault = lib.mkMerge [
|
||||||
(lib.mkIf (config.cats.r or false) {
|
(lib.mkIf (config.cats.r or false) {
|
||||||
R_LIBS_USER = "${pkgs.nvimcom}:$PWD/.Rlibs";
|
R_LIBS_USER = "${pkgs.nvimcom}/library:$PWD/.Rlibs";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
(config.nvim-lib.neovimPlugins.r.overrideAttrs (old: {
|
(config.nvim-lib.neovimPlugins.r.overrideAttrs (old: {
|
||||||
postInstall = (old.postInstall or "") + ''
|
postInstall = (old.postInstall or "") + ''
|
||||||
mkdir -p $out/rnvimserver
|
mkdir -p $out/rnvimserver
|
||||||
cp ${pkgs.nvimcom}/bin/rnvimserver $out/rnvimserver/rnvimserver
|
cp ${pkgs.rnvimserver}/bin/rnvimserver $out/rnvimserver/rnvimserver
|
||||||
chmod +x $out/rnvimserver/rnvimserver
|
chmod +x $out/rnvimserver/rnvimserver
|
||||||
'';
|
'';
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,14 @@ let
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
|
||||||
rOverlay = import ./r.nix {inherit inputs;};
|
rOverlay = import ./r.nix {inherit inputs;};
|
||||||
|
rNvimNixOverlay = inputs.r-nvim-nix.overlays.default;
|
||||||
franOverlay = inputs.fran.overlays.default;
|
franOverlay = inputs.fran.overlays.default;
|
||||||
pythonOverlay = import ./python.nix inputs;
|
pythonOverlay = import ./python.nix inputs;
|
||||||
pluginsOverlay = import ./plugins.nix inputs;
|
pluginsOverlay = import ./plugins.nix inputs;
|
||||||
|
|
||||||
dependencyOverlays = [
|
dependencyOverlays = [
|
||||||
rOverlay
|
rOverlay
|
||||||
|
rNvimNixOverlay
|
||||||
pythonOverlay
|
pythonOverlay
|
||||||
pluginsOverlay
|
pluginsOverlay
|
||||||
];
|
];
|
||||||
|
|
@ -17,6 +19,7 @@ in
|
||||||
{
|
{
|
||||||
inherit
|
inherit
|
||||||
rOverlay
|
rOverlay
|
||||||
|
rNvimNixOverlay
|
||||||
franOverlay
|
franOverlay
|
||||||
pythonOverlay
|
pythonOverlay
|
||||||
pluginsOverlay
|
pluginsOverlay
|
||||||
|
|
@ -30,6 +33,7 @@ in
|
||||||
overlays = {
|
overlays = {
|
||||||
inherit
|
inherit
|
||||||
rOverlay
|
rOverlay
|
||||||
|
rNvimNixOverlay
|
||||||
franOverlay
|
franOverlay
|
||||||
pythonOverlay
|
pythonOverlay
|
||||||
pluginsOverlay
|
pluginsOverlay
|
||||||
|
|
|
||||||
|
|
@ -33,38 +33,15 @@
|
||||||
overlays = [inputs.fran.overlays.default];
|
overlays = [inputs.fran.overlays.default];
|
||||||
}; # rixpkgs.legacyPackages.${prev.stdenv.hostPlatform.system};
|
}; # rixpkgs.legacyPackages.${prev.stdenv.hostPlatform.system};
|
||||||
|
|
||||||
# Pre-build nvimcom from R.nvim plugin source so R.nvim never tries to
|
# nvimcom and rnvimserver are provided by the r-nvim-nix flake overlay
|
||||||
# compile it at runtime into the read-only nix store.
|
# (inputs.r-nvim-nix.overlays.default)
|
||||||
nvimcom = final.stdenv.mkDerivation {
|
|
||||||
pname = "nvimcom";
|
|
||||||
version = "0.9.92";
|
|
||||||
src = inputs.plugins-r;
|
|
||||||
nativeBuildInputs = [
|
|
||||||
(rpkgs.rWrapper.override { packages = []; })
|
|
||||||
];
|
|
||||||
buildPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
R CMD INSTALL -l $out nvimcom
|
|
||||||
cd rnvimserver
|
|
||||||
$CC -pthread -O2 -Wall \
|
|
||||||
complete.c resolve.c hover.c definition.c signature.c \
|
|
||||||
rhelp.c chunk.c roxygen.c data_structures.c logging.c \
|
|
||||||
rnvimserver.c obbr.c tcp.c utilities.c ../nvimcom/src/common.c \
|
|
||||||
-o $out/bin/rnvimserver
|
|
||||||
cd ..
|
|
||||||
mkdir -p $out/nvimcom/bin
|
|
||||||
cp $out/bin/rnvimserver $out/nvimcom/bin/rnvimserver
|
|
||||||
chmod +x $out/bin/rnvimserver $out/nvimcom/bin/rnvimserver
|
|
||||||
'';
|
|
||||||
installPhase = "true";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Standard R packages used by default in rWrapper and quarto
|
# Standard R packages used by default in rWrapper and quarto
|
||||||
reqPkgs = with rpkgs.rPackages; [
|
reqPkgs = with rpkgs.rPackages; [
|
||||||
# languageserver
|
# languageserver
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
inherit rpkgs nvimcom;
|
inherit rpkgs;
|
||||||
baseRPackages = reqPkgs;
|
baseRPackages = reqPkgs;
|
||||||
|
|
||||||
# R wrapper with standard packages
|
# R wrapper with standard packages
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue