Skip to content
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

docs(readme): add tip to configure luarocks install with envvars #131

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

pysan3
Copy link
Contributor

@pysan3 pysan3 commented Feb 1, 2024

When lua and luajit is not installed via the system package manager, luarocks build script
fails to detect the lua runtime, which results in a fail.

image

Usually, we can ./configure with options such as --with-lua (cli options), but as this is run in the background, I cannot edit these options, or I would need to add a new field in the UI which is kinda hassle.

Luarocks build scripts uses variables such as LUA_DIR, so we can trick the script by providing these varibles from outside.
To workaround this issue, I added a [!TIP] in the README for other people who came across the same issue.


Tip

In order to configure luarocks installation to use a specific lua install,
use environment variables LUA_BINDIR=<Directory of lua binary> and LUA_BINDIR_SET=yes.

For example:

LUA_BINDIR="${XDG_BIN_DIR:-$HOME/.local/bin}" LUA_BINDIR_SET=yes nvim -u NORC -c "source ...

Copy link
Contributor

github-actions bot commented Feb 1, 2024

Review Checklist

Does this PR follow the Contribution Guidelines? Following is a partial checklist:

Proper conventional commit scoping:

  • For example, fix(installer): some installer bugfix

  • Pull request title has the appropriate conventional commit prefix.

If applicable:

  • Tested
    • Tests have been added.
    • Tested manually (steps in PR description).
  • Updated documentation.

README.md Outdated Show resolved Hide resolved
Co-authored-by: Marc Jakobi <[email protected]>
Copy link
Member

@mrcjkb mrcjkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again 😄

@mrcjkb mrcjkb merged commit 2d2e41a into nvim-neorocks:master Feb 1, 2024
3 checks passed
@pysan3 pysan3 deleted the configure-luarocks-install branch February 1, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants