-
Notifications
You must be signed in to change notification settings - Fork 24
[Feature Request] Any plans in the future to make this exension compatable with nixos? #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Debian has an application named |
What would be necessary to make |
@VtheRtech, I'm closing the issue. Please reopen it if you know what would be required for |
NixOS/nixpkgs#346445 (comment) |
Doesn't it work if you install |
I installed the dependecies but unfortunatly no it did not work. There where majore issues with how it was interacting with shell enviroments. After talking with people who know a bit more than me, I was told it was because it compiled at run time, nix is immutable and won't let things compile unless its explicently through nix. |
I just spent a little over a week attempting to package neovim and R.nvim with Nix and I am glad I stumbled upon this issue. Now I know that it wasn't a skill issue 😄 It would be awesome if it worked! Nix is becoming increasingly popular in the R community thanks to the |
It turns out that I followed the suggestion of @jalvesaq and it worked! I included |
The issue I had was that it would break upon entering a shell. I haven't tested it with flakes yet so maybe that is a work around? But I've I'm using nixos, so that is probably my issue until this gets packaged. |
Clearly, the ultimate solution would be for the plugin to be packaged. You are right! Although I don't use NixOS, I know for a fact that home-manager and flakes can be used inside it. You may be hesitant to use flakes because it is still considered "experimental". However, they have become so popular that I would not really worry about it. |
Hi, (final: _prev: {
rPackages =
prev.rPackages
// {
nvimcom = final.rPackages.buildRPackage {
name = "nvimcom";
src = final.fetchFromGitHub {
owner = "R-nvim";
repo = "R.nvim";
rev = "main";
sha256 = "sha256-5QYQRN5zQWGTSEpkNr7WHVe167vHtyytSE+vF10cdZI=";
};
sourceRoot = "source/nvimcom";
buildInputs = with final; [R gcc gnumake];
propagatedBuildInputs = with final.rPackages; [];
};
};
})
and then just added it to the rWrapper: RCustom = { pkgs.rWrapper.override {
packages = with pkgs.rPackages; [
nvimcom
tidyverse
# ...
];
}; Unfortunately, I was not able to get rix to work with R.nvim without major manual intervention every time a new shell environment template is created (which kinda defeats the purpose of rix), or forking rix and changing the way it handles remote dependencies / overlayed packages. Perhaps adding the ability to specify a subfolder for fetching R packages via remote repos within rix may be the best solution to this. |
Hello, author of rix here, what would be the best approach to solve this? rix allows for IDEs to be specific in the |
Hi, thanks for the great work and the fast reply! |
I mean, we could simply add the following (by changing what’s needed, but most would stay I guess) to the
when the user sets |
Whops, of course you could just overlay it in default.nix itself! Sorry for the misinterpretation. I knew I missed something. I guess that's a way to do it. The problem is the hardcoded hash and that R.Nvim will complain if there is a version mismatch between itself and nvimcom, so optimally I guess R.Nvim would have to be included into the build inputs as well somehow. Personally I don't have an issue with manually updating it. But this is such a niche case, I'm not sure if this should be any kind of default for rix. This is a working default.nix with a R.Nvim installed on the system if running impure: let
pkgs = import (fetchTarball "https://github.com/rstats-on-nix/nixpkgs/archive/2025-01-27.tar.gz") {
overlays = [
(final: prev: {
rPackages =
prev.rPackages
// {
nvimcom = final.rPackages.buildRPackage {
name = "nvimcom";
src = final.fetchFromGitHub {
owner = "R-nvim";
repo = "R.nvim";
rev = "main";
sha256 = "sha256-5QYQRN5zQWGTSEpkNr7WHVe167vHtyytSE+vF10cdZI=";
};
sourceRoot = "source/nvimcom";
buildInputs = with final; [R gcc gnumake];
propagatedBuildInputs = with final.rPackages; [];
};
};
})
];
};
rpkgs = builtins.attrValues {
inherit
(pkgs.rPackages)
dplyr
ggplot2
nvimcom
;
};
system_packages = builtins.attrValues {
inherit
(pkgs)
glibcLocales
nix
R
;
};
in
pkgs.mkShell {
LOCALE_ARCHIVE =
if pkgs.system == "x86_64-linux"
then "${pkgs.glibcLocales}/lib/locale/locale-archive"
else "";
LANG = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
buildInputs = [rpkgs system_packages];
} |
Thanks! 🤔 maybe we could get this into upstream, I guess it’ll make things easier. I have 0 experience with packaging vim extensions for nix though |
Same. Even with upstreaming it, I imagine it would be a hassle to keep the nvimcom version in sync with R and R.nvim when using rix, where R.nvim can't just install nvimcom itself. But I'm quite happy that just adding the overlay to the import gets it working. Thanks for the help! |
Was wondering if there where plans in the future to make this compatable with nixos & the nix-shell enviroment?
Currently there is no way to get this working on nixos, unless its dependenceis are added to nixpkgs.
The text was updated successfully, but these errors were encountered: