Stratus3D / asdf-lua

Lua plugin for asdf version manager. https://github.com/asdf-vm/asdf
MIT License
62 stars 13 forks source link

`LUA_DIR` environment variable #33

Closed nabato closed 1 year ago

nabato commented 1 year ago

Thank you for your work. Very handy plugin.

It would be great to add LUA_DIR environment variable during installation (optionally LUA_LIBRARIES and LUA_INCLUDE_DIR but LUA_DIR should be enough) and update them every time during language version switch.

Stratus3D commented 1 year ago

It's been a while since I've used Lua myself. Are you saying these need to be set for the Lua install? Or are you saying these variables should be set when running commands from the Lua install (e.g. lua, luarocks, etc...)?

nabato commented 1 year ago

@Stratus3D, basically some applications like awesome-wm search for LUA_DIR during installation to access its lib and include directories. I honestly don't know how often it's needed for other applications, but googling reveals it's a problem not only for awesome-wm.

P.S. Changed description to LUA_DIR because less changes are required.

Stratus3D commented 1 year ago

asdf isn't setup to define environment variables for commands outside of asdf. You'll probably need to define it manually in whatever environments you want it set it. Something like this might work:

export LUA_DIR=$(asdf where lua)/lib

# invoke awesome-wm or whatever

Hope this helps.

nabato commented 1 year ago

Already did something like this. Thank you.