Mehgugs / lacord

A low level, lightweight discord API library.
MIT License
6 stars 0 forks source link

Remove luatweetnacl dependency #11

Open Frityet opened 2 years ago

Frityet commented 2 years ago
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

Mehgugs commented 2 years ago

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)
Mehgugs commented 2 years ago

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.)

Mehgugs commented 2 years ago

Notes to future self:

If tweetnacl.c is bundled with lacord the following problems must be solved:

We could also look at getting EdDSA supported in luaossl (see: https://github.com/wahern/luaossl/issues/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.