Remove luatweetnacl dependency
Opened this issue · 3 comments
Error: Failed installing dependency: https://luarocks.org/lacord-1637789515-0.src.rock - Failed installing dependency: https://luarocks.org/luatweetnacl-0.5-1.rockspec - This rockspec for luatweetnacl does not support bsd, macos, macosx, unix platforms.
Running MacOS Montery, 12.4. Latest LuaRocks version, using luarocks install luatweetnacl
Hi there, I didn't get a notification so missed this issue. I'm not sure how this can be possible. I'll have a dig into the rockspecs but could you try installing the package directly too?
❯ uname -o ; luarocks show luatweetnacl
GNU/Linux
luatweetnacl 0.5-1 - A simple binding to the NaCl crypto library.
A simple binding to the NaCl crypto library. The binding includes the "tweet"
version of the NaCl library
License: MIT
Homepage: https://github.com/philanc/luatweetnacl
Installed in: /usr/local
Modules:
luatweetnacl (/usr/local/lib/lua/5.4/luatweetnacl.so)
Depends on:
lua >= 5.1 (using 5.4-1)
I've found the issue; it's the platform definition of luatweetnacl in their rockspec. (This is not an issue with lacord but perhaps something I can sidestep for users by including in lacord itself.)
Notes to future self:
If tweetnacl.c is bundled with lacord the following problems must be solved:
- platform dependent random u8 implementation must be done for linux, BSDs, and generic unix.
- (is this worth it?)
We could also look at getting EdDSA supported in luaossl (see: wahern/luaossl#188), but the openssl interface to EdDSA is horrible since we have to go through ASN.1 defined public keys which discord does not provide.