-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
support installation of luarocks packages as vim plugins #131499
Conversation
rapidjson,,,,, | ||
readline,,,,, | ||
say,,,,, | ||
std__debug,std._debug,,,, | ||
std-_debug,std._debug,,,, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normalization is not fully working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean ? original package name is std._debug
it gets renamed to std-_debug
.
# Normalize package name | ||
nix_pkg_name_normalized=$(sed 's/\./-/' <(echo "$nix_pkg_name")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Normalize package name | |
nix_pkg_name_normalized=$(sed 's/\./-/' <(echo "$nix_pkg_name")) | |
# Normalize package name | |
nix_pkg_name_normalized=$(sed 's/\./-/' <(echo "$nix_pkg_name")) |
# this is an approximation | ||
target="$out/$rtpPath/$pname" | ||
mkdir -p $out/${rtpPath} | ||
cp -r . $target | ||
|
||
# build help tags | ||
if [ -d "$target/doc" ]; then | ||
echo "Building help tags" | ||
if ! @vimBinary@ -N -u NONE -i NONE -n -E -s -V1 -c "helptags $target/doc" +quit!; then | ||
echo "Failed to build help tags!" | ||
exit 1 | ||
fi | ||
else | ||
echo "No docs available" | ||
fi | ||
|
||
if [ -n "$addonInfo" ]; then | ||
echo "$addonInfo" > $target/addon-info.json | ||
fi | ||
runHook postInstall | ||
echo "Finished executing vimPluginInstallPhase" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is formated inconsistend.
I am now able to install neovim lua packages registered on luarocks via this, for instance gitsigns.nvim. Should be mostly ready. |
This commit shows how to convert luarocks packages into (neo)vim ones. The advantage for neovim lua plugins to register their rockspec (aka package definition) is that the plugin can express its dependencies and a few metadata through it.
Motivation for this change
neovim has a vibrant lua ecosystem and I would like to encourage vim plugin authors to rely on luaroicks rather than having every user specify the dependencies themselves. May lead nowhere.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)