-
Notifications
You must be signed in to change notification settings - Fork 467
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
NixOS support #886
Comments
I have used NixOS before. In fact, There are tons of changes need to be done to make the configuration work for NixOS. For example, all of lsp servers installed by |
You are right. |
I'm curious about nix, how does it work with conda? |
You can use conda on NixOS, but packages that use libraries that depend on other languages, such as Cython, have a high probability of not working properly. |
Also, if you are using the nvim on NixOS#! /nix/store/a7f7xfp9wyghf44yv6l6fv9dfw492hd3-bash-5.2-p15/bin/bash -e
export NVIM_SYSTEM_RPLUGIN_MANIFEST='/nix/store/05xj82s93524lzrg30cww0sazx1wdfd6-neovim-0.9.1/rplugin.vim'
export GEM_HOME='/nix/store/r5vapmr8hsj3c48nl77fdkxyph9m17hb-neovim-ruby-env/lib/ruby/gems/3.1.0'
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/r5vapmr8hsj3c48nl77fdkxyph9m17hb-neovim-ruby-env/bin'':'* ]]; then
PATH=$PATH'/nix/store/r5vapmr8hsj3c48nl77fdkxyph9m17hb-neovim-ruby-env/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/r50qp4i6d4ry7x89aahwc22qz0y7fvzv-nodejs-18.16.1/bin'':'* ]]; then
PATH=$PATH'/nix/store/r50qp4i6d4ry7x89aahwc22qz0y7fvzv-nodejs-18.16.1/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
LUA_PATH=${LUA_PATH:+';'$LUA_PATH';'}
LUA_PATH=${LUA_PATH/';''/nix/store/x8j4191ax47lq08d3620za8j4rpxfzdj-luajit-2.1.0-2022-10-04-env/share/lua/5.1/?/init.lua'';'/';'}
LUA_PATH='/nix/store/x8j4191ax47lq08d3620za8j4rpxfzdj-luajit-2.1.0-2022-10-04-env/share/lua/5.1/?/init.lua'$LUA_PATH
LUA_PATH=${LUA_PATH#';'}
LUA_PATH=${LUA_PATH%';'}
export LUA_PATH
LUA_PATH=${LUA_PATH:+';'$LUA_PATH';'}
LUA_PATH=${LUA_PATH/';''/nix/store/x8j4191ax47lq08d3620za8j4rpxfzdj-luajit-2.1.0-2022-10-04-env/share/lua/5.1/?.lua'';'/';'}
LUA_PATH='/nix/store/x8j4191ax47lq08d3620za8j4rpxfzdj-luajit-2.1.0-2022-10-04-env/share/lua/5.1/?.lua'$LUA_PATH
LUA_PATH=${LUA_PATH#';'}
LUA_PATH=${LUA_PATH%';'}
export LUA_PATH
LUA_CPATH=${LUA_CPATH:+';'$LUA_CPATH';'}
LUA_CPATH=${LUA_CPATH/';''/nix/store/x8j4191ax47lq08d3620za8j4rpxfzdj-luajit-2.1.0-2022-10-04-env/lib/lua/5.1/?.so'';'/';'}
LUA_CPATH='/nix/store/x8j4191ax47lq08d3620za8j4rpxfzdj-luajit-2.1.0-2022-10-04-env/lib/lua/5.1/?.so'$LUA_CPATH
LUA_CPATH=${LUA_CPATH#';'}
LUA_CPATH=${LUA_CPATH%';'}
export LUA_CPATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/hw2xmrqirmrq4f3vl7nbf53ivif8gny7-cargo-1.70.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/hw2xmrqirmrq4f3vl7nbf53ivif8gny7-cargo-1.70.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/1b4vykls7dlbyhw2jygcz7wgf86i7x3n-deno-1.35.1/bin'':'* ]]; then
PATH=$PATH'/nix/store/1b4vykls7dlbyhw2jygcz7wgf86i7x3n-deno-1.35.1/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/x7n44lfys59k5ajj9w1fkxw5391cnn5v-gcc-wrapper-12.3.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/x7n44lfys59k5ajj9w1fkxw5391cnn5v-gcc-wrapper-12.3.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/3l1hdz7xqyh1qhq9yn6cm8cfl3n1gyd3-gnumake-4.4.1/bin'':'* ]]; then
PATH=$PATH'/nix/store/3l1hdz7xqyh1qhq9yn6cm8cfl3n1gyd3-gnumake-4.4.1/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/nvydgjdaff1i887x2fk8kygcrbxyfyiy-go-1.20.5/bin'':'* ]]; then
PATH=$PATH'/nix/store/nvydgjdaff1i887x2fk8kygcrbxyfyiy-go-1.20.5/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/vy6qf5ny58a2pr21q1hx4p9hgians0sc-ninja-1.11.1/bin'':'* ]]; then
PATH=$PATH'/nix/store/vy6qf5ny58a2pr21q1hx4p9hgians0sc-ninja-1.11.1/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/vfqcpzf6a6dy1iy3f51gwfny0ks7rgld-patchelf-0.15.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/vfqcpzf6a6dy1iy3f51gwfny0ks7rgld-patchelf-0.15.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/d9hc3hfmxrpfrh8qmckqnbdwkxpfand8-sqlite-3.42.0-bin/bin'':'* ]]; then
PATH=$PATH'/nix/store/d9hc3hfmxrpfrh8qmckqnbdwkxpfand8-sqlite-3.42.0-bin/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/k75gz90y97nw6hv4n6fprf9dlv25k3yv-yarn-1.22.19/bin'':'* ]]; then
PATH=$PATH'/nix/store/k75gz90y97nw6hv4n6fprf9dlv25k3yv-yarn-1.22.19/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/x4a5mk7z25h5mcm2895izm6fqqr77wm6-xclip-0.13/bin'':'* ]]; then
PATH=$PATH'/nix/store/x4a5mk7z25h5mcm2895izm6fqqr77wm6-xclip-0.13/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/l74qmkwqbpcickrh51nf60j9d5cf3h6c-ripgrep-13.0.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/l74qmkwqbpcickrh51nf60j9d5cf3h6c-ripgrep-13.0.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/hcn4y9ymmc10yan23xz7llajkmvqjcng-neovim-remote-2.5.1/bin'':'* ]]; then
PATH=$PATH'/nix/store/hcn4y9ymmc10yan23xz7llajkmvqjcng-neovim-remote-2.5.1/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/hl0xb3ljxiaxgm8xgn89x2lm4dmki3j6-bash-language-server-5.0.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/hl0xb3ljxiaxgm8xgn89x2lm4dmki3j6-bash-language-server-5.0.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/fw8p64rw0jixi9yaqwcdjqcbb9x1511r-clang-tools-14.0.6/bin'':'* ]]; then
PATH=$PATH'/nix/store/fw8p64rw0jixi9yaqwcdjqcbb9x1511r-clang-tools-14.0.6/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/jv0pwsrcq9p7r2r8af0bljxi3icpi4nk-csharp-ls-0.8.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/jv0pwsrcq9p7r2r8af0bljxi3icpi4nk-csharp-ls-0.8.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/5h1zq4qf112b7z2yhmw77bazj9xcq740-efm-langserver-0.0.44/bin'':'* ]]; then
PATH=$PATH'/nix/store/5h1zq4qf112b7z2yhmw77bazj9xcq740-efm-langserver-0.0.44/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/17sfw9qhbscynh9h1yf7jswxnn13ajf5-eslint-8.45.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/17sfw9qhbscynh9h1yf7jswxnn13ajf5-eslint-8.45.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/cpya7699rjkr1wznqwcdwds5gzqx6q8p-gopls-0.12.4/bin'':'* ]]; then
PATH=$PATH'/nix/store/cpya7699rjkr1wznqwcdwds5gzqx6q8p-gopls-0.12.4/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/bs0y5fk4ly0ghj6xcpb9rs0acrm6qzkd-haskell-language-server-2.0.0.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/bs0y5fk4ly0ghj6xcpb9rs0acrm6qzkd-haskell-language-server-2.0.0.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/1nv9gvss7bbmm9ikyr2wsqw9ji4yqmrn-vscode-html-languageserver-bin-1.4.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/1nv9gvss7bbmm9ikyr2wsqw9ji4yqmrn-vscode-html-languageserver-bin-1.4.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/9daxxhi06gbib93k98yim9x7m0pidl1p-vscode-json-languageserver-1.3.4/bin'':'* ]]; then
PATH=$PATH'/nix/store/9daxxhi06gbib93k98yim9x7m0pidl1p-vscode-json-languageserver-1.3.4/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/1xw35gw67b20qzn2k6m18y7xswl04kxl-lua-language-server-3.6.23/bin'':'* ]]; then
PATH=$PATH'/nix/store/1xw35gw67b20qzn2k6m18y7xswl04kxl-lua-language-server-3.6.23/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/0zx7rwda8c7xncq4wnlbpf28pfja44na-marksman-2023-03-04/bin'':'* ]]; then
PATH=$PATH'/nix/store/0zx7rwda8c7xncq4wnlbpf28pfja44na-marksman-2023-03-04/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/pl73ayc481hi2plkfw0cpm4csvjmjhbf-nil-2023-05-09/bin'':'* ]]; then
PATH=$PATH'/nix/store/pl73ayc481hi2plkfw0cpm4csvjmjhbf-nil-2023-05-09/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/dg31145d9ssk7kvc8c1yf3iv71l12sbs-pyright-1.1.317/bin'':'* ]]; then
PATH=$PATH'/nix/store/dg31145d9ssk7kvc8c1yf3iv71l12sbs-pyright-1.1.317/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/irmk9r7cf3pb7xwq53isv4cwvcldi1z6-taplo-0.8.1/bin'':'* ]]; then
PATH=$PATH'/nix/store/irmk9r7cf3pb7xwq53isv4cwvcldi1z6-taplo-0.8.1/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/wk865sdshhv1c70ijxpi3zyrvx8hqaqa-terraform-ls-0.31.3/bin'':'* ]]; then
PATH=$PATH'/nix/store/wk865sdshhv1c70ijxpi3zyrvx8hqaqa-terraform-ls-0.31.3/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/046q858668makmbr4mxqig036ckv9ss3-texlab-5.7.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/046q858668makmbr4mxqig036ckv9ss3-texlab-5.7.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/9761naw3l6pzwxx5sxkh9lfyz7mgvrwg-alejandra-3.0.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/9761naw3l6pzwxx5sxkh9lfyz7mgvrwg-alejandra-3.0.0/bin'
fi</details>
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/yhg7zdhm68npjf7mwfzhk06m4c7j78x3-python3.10-black-23.3.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/yhg7zdhm68npjf7mwfzhk06m4c7j78x3-python3.10-black-23.3.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/fw8p64rw0jixi9yaqwcdjqcbb9x1511r-clang-tools-14.0.6/bin'':'* ]]; then
PATH=$PATH'/nix/store/fw8p64rw0jixi9yaqwcdjqcbb9x1511r-clang-tools-14.0.6/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/4xyxhdvsrlnhix4dbi7c8mfddxxj6zgz-prettier-3.0.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/4xyxhdvsrlnhix4dbi7c8mfddxxj6zgz-prettier-3.0.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/5gjj5wpcaa6zh1sh3163b2g1f6nryds9-rustfmt-1.70.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/5gjj5wpcaa6zh1sh3163b2g1f6nryds9-rustfmt-1.70.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/682jxw3nnp08jprsi1aldlzrvrj6rpnj-shfmt-3.7.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/682jxw3nnp08jprsi1aldlzrvrj6rpnj-shfmt-3.7.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/lwljm6b3r4l26bx8s99jvx712ymvxiij-stylua-0.18.1/bin'':'* ]]; then
PATH=$PATH'/nix/store/lwljm6b3r4l26bx8s99jvx712ymvxiij-stylua-0.18.1/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/hwmr1i0sh9achlgnlq8yxg7smhm0w08h-terraform-1.5.3/bin'':'* ]]; then
PATH=$PATH'/nix/store/hwmr1i0sh9achlgnlq8yxg7smhm0w08h-terraform-1.5.3/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/5z808vcd8481c3ya120yr941qnidqx23-python3.10-flake8-6.0.0/bin'':'* ]]; then
PATH=$PATH'/nix/store/5z808vcd8481c3ya120yr941qnidqx23-python3.10-flake8-6.0.0/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/v8rsqa5qvijjq4q7ivnjw7sjl9v02xcc-vim-vint-0.3.21/bin'':'* ]]; then
PATH=$PATH'/nix/store/v8rsqa5qvijjq4q7ivnjw7sjl9v02xcc-vim-vint-0.3.21/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/22saljw2b8fnl3aw0mh7j0jjgmc2lkkg-shellcheck-0.9.0-bin/bin'':'* ]]; then
PATH=$PATH'/nix/store/22saljw2b8fnl3aw0mh7j0jjgmc2lkkg-shellcheck-0.9.0-bin/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/k4ciwh7qxba15g3cm3vnvkcy4kfbpwhq-statix-0.5.6/bin'':'* ]]; then
PATH=$PATH'/nix/store/k4ciwh7qxba15g3cm3vnvkcy4kfbpwhq-statix-0.5.6/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
exec -a "$0" "/nix/store/mmp203bf0m9cz39di4pj1xq456ffjwbf-neovim-unwrapped-0.9.1/bin/nvim" --cmd "lua vim.g.node_host_prog='/nix/store/05xj82s93524lzrg30cww0sazx1wdfd6-neovim-0.9.1/bin/nvim-node';vim.g.loaded_perl_provider=0;vim.g.loaded_python_provider=0;vim.g.python3_host_prog='/nix/store/05xj82s93524lzrg30cww0sazx1wdfd6-neovim-0.9.1/bin/nvim-python3';vim.g.ruby_host_prog='/nix/store/05xj82s93524lzrg30cww0sazx1wdfd6-neovim-0.9.1/bin/nvim-ruby'" "$@" home-manager config# neovim conf
# I use conf sourcing ./nvim but you can manager from home manager.
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.programs.neovim.useMyDots;
json = importJSON ../../lsp/pkgs.json;
json2list = x: attrsets.mapAttrsToList (name: value: value) x;
sp = x: splitString "." x;
list2pkg = pkgs: list:
with builtins;
map (x:
if length (sp x) > 1
then pkgs."${head (sp x)}"."${head (drop 1 (sp x))}"
else pkgs."${x}")
list;
in {
options = {
programs.neovim.useMyDots = {
enable = mkEnableOption ''
My nvim config
'';
};
};
config = mkIf cfg.enable {
xdg = {
configFile = {
"nvim/lua".source = ../../lua; # windowsとconfigを共有するため.config/nvimで管理する
"nvim/init.lua".source = ../../init.lua;
"nvim/lsp".source = ../../lsp;
"latexmk".source = ../../latexmk;
};
};
home.sessionVariables = {
SQLITE_CLIB_PATH = "${pkgs.sqlite.out}/lib/libsqlite3.so";
};
programs.neovim = {
enable = true; # Replace from vi&vim to neovim
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
withRuby = true;
extraPackages = with pkgs;
[
cargo
deno
gcc
gnumake
go
ninja
patchelf
sqlite
yarn
xclip
ripgrep
# LSP
neovim-remote
]
++ list2pkg pkgs (json2list json.lsp)
++ list2pkg pkgs (json2list json.null-ls.formatting)
++ list2pkg pkgs (json2list json.null-ls.diagnostics)
++ list2pkg pkgs (json2list json.null-ls.code_actions);
extraPython3Packages = ps:
with ps; [
isort
docformatter
doq
pynvim
];
};
};
} |
Also I guess Lines 111 to 114 in b44d015
are not necessary as conda always set it's path at very first so python should refer to it correctly
|
cant really test this since i dont use conda nowadays. |
|
As mentioned in #887, I sent an issue and pull req for NixOS support. |
@misumisumi If I understand correctly does supporting NixOS imply that we mainly need to avoid these two:
The former is not that difficult to tackle - as after #738, all executables except for those Python-related stuffs will be handled by the operating system instead. This assigns the responsibility for correctly specifying Neovim itself and its potential providers (which For the latter, can NixOS provide a solution from "the other side" of the issue (i.e., let |
The issues to be avoided are as you point out.
Simply specify the command to be executed as you would normally use in a distibution.
It is possible to patch ELF using hooks during
In my implementation, the packages used by LSP, fomatter and code_action etc (using from null-ls) and DAP are installed by nix package manager without using
When neovim is managed by home-manager, packages such as language server are not installed globally, but a separate environment is created by nix that contains them. |
seems like a lot of work 😮 |
Thanks for the info. In this case, #738 will surely do its job. We only need to make some changes to Python-related stuffs then. Possibly also via
AFAIK ~/.my_profile/lib => ~/.my_profile/<hash>/lib:
lrwxr-xr-x jint admin 48 B Sat Jun 17 12:22:08 2023 libboost_json.dylib => ../Cellar/boost/1.82.0_1/lib/libboost_json.dylib This way, each session only needs to specify its dynamic linker and everything should work. LD_LIBRARY_PATH="/path/to/your/profile/lib:/path/to/your/system/lib:$LD_LIBRARY_PATH"
<mod-elf> --libdyld /path/to/your/profile/lib/ld.so <exec-to-be-patched> # Modified via Mason
##### Or a persistent solution #####
<mod-elf> --prepend-rpath "$LD_LIBRARY_PATH" <exec-to-be-patched> # Modified via Mason
Can this issue be alleviated by using the above method? Cause all packages will instead use |
I think it is possible to create a custom package that bundles the required shared libraries it depends on, install it in the environment, and then set up the However, it seems like it has been abandoned, as discussed in mason.nvim#428. |
I just randomly browsed through the NixOS reference manual and bumped into package-management/profiles, will this help? Example setup (modified based on williamboman/mason.nvim#428 (comment)): patchelf --set-interpreter /home/USER/.nix-profile/lib/ld-linux-x86-64.so.2 ${mason_registry_entry}
export LD_LIBRARY_PATH="/home/USER/.nix-profile/lib:/nix/var/nix/profiles/system/sw/lib/:/lib64/:/usr/lib64/:$LD_LIBRARY_PATH"
### persistent patch ###
patchelf --set-rpath "$LD_LIBRARY_PATH" ${mason_registry_entry}
FYI, this is a non-exhaustive list of dependencies generated via [Required: Nvim]
libluv.1.dylib
libtermkey.1.dylib
libvterm.0.dylib
libmsgpack-c.2.dylib
libtree-sitter.0.dylib
libunibilium.4.dylib
libintl.8.dylib
libluajit-5.1.2.dylib
libutil.dylib
libuv.1.dylib
[Required: Mason-registries]
libiconv.2.dylib
libz.1.dylib
libresolv.9.dylib
libc.6.dylib
libstdc++.6.dylib (GCC) [OR] libc++.1.dylib (LLVM)
libobjc.A.dylib (if possible via GNUStep)
[Required: Mason]
unzip
wget
curl
gzip
tar
bash [OR] sh
ruby
go
cargo
gem (RubyGem)
luarocks
node
java
npm
python [OR] python3
javac
pip
julia
php
composer
I think what williamboman means is this will not receive upstream support, but those hooks are still available, which implies configuration on a per-repo basis is still feasible. |
Thank you for your research!
I've been struggling with enumerating required dependencies and this is very helpful!
Can you think of a way to detect dynamic linker updates from mason?
Unfortunately this is the path hierarchy when using the nix package manager alone. |
Mason has a private API that was originally (and intended to be) used to check for updates for its registries (by comparing version numbers), but this can also be used to check other executables. |
Can you tell me the API for that? |
I'm afraid I can't tell you right away (I forget its name). I scanned the source code of |
@misumisumi It's |
Think you! I checked. I want to discuss a bit about installing packages.
I also have concerns about ELF patches to binaries.
|
Here a comparison using mason.nvim and nixpkgs Using
|
In any case, proceed with the implementation of the setup process using |
I'm prone to using this to check the version of the dynamic linker, and perform updates whenever it's necessary. mason-org/mason-registry provides rich information about each package. We can (and should) use its API to correctly handle
If we use mason-registry, only one post-install hook needs to be registered. Not that complicated I think? IMO for long-term benefits and to reduce maintenance pressure, we should stick with nvimdots/lua/modules/configs/completion/lsp.lua Lines 143 to 148 in 6de8afe
Another benefit is, to uninstall Neovim, one only need to remove the directory pointed to by stdpath (and Neovim itself). No additional cleaning needs to be performed. |
This is a tricky one to install, |
I was adamant about ending with |
I came across nix-ld while researching how to run executable binaries on NixOS. The problem was creating NixOSModule for home-manager. the solution is to create
|
how to configurate the jdtls to use java module? |
check wiki first |
Maybe nix users can try configuring |
https://github.com/Mic92/nix-ld?tab=readme-ov-file#does-this-work-on-non-nixos-system
if ppl use nix/home-manager on other *nix system, |
Oh, I forget that you can use nix on other distro, sorry( |
Version confirmation
Following prerequisites
Neovim version
NVIM v0.9.1
Operating system/version
NixOS 23.11.20230718.684c17c (Tapir)
Terminal name/version
wezterm 20230712-072601-f4abf8fd
$TERM environment variable
xterm-256color
Branch info
main (Default/Latest)
Fetch Preferences
SSH (use_ssh = true)
How to reproduce the issue
If the python host prog is set on a system that does not support the Filesystem Hierarchy Standard (FHS), such as NixOS, dependencies related to python cannot be resolved.
This is because NixOS uses a python environment on NixOS that is isolated from the system python, and this environment is set via command line arguments, which are overridden by nvimdots.
A new configuration entry prevents nvimdots from overwriting it.
Expected behavior
:python3 import neovim
で正常にimportされる。Actual behavior
:python3 import neovim
でエラーが発生する。Additional information
No response
The text was updated successfully, but these errors were encountered: