Hi Ryan, Cc: Lua team members.
Ryan Prior <[email protected]> skribis: > Hi folks! I've been using Lua lately and decided to set up a Guix-based dev > environment. I struggled and learned some interesting things > along the way, so I wrote up a report that I imagine will be of interest to > some other Guix folks, available at > https://www.ryanprior.com/posts/lua-dependencies-with-guix-and-luarocks/ This is interesting feedback! One takeaway for me is that LuaRocks, like quite a few other packages, appears to be making strong assumptions about the underlying system, and expects it to following the filesystem hierarchy standard (FHS). We see this notably when you show it’s looking for OpenSSL headers in /usr/local/include, etc. Also, as you wrote, LuaRocks can easily “escape” the Guix environment by resorting to stuff from /usr/bin, etc. Another takeaway is that the ‘luarocks’ package in Guix doesn’t help you go past these hurdles, although it might be a valid tradeoff, I don’t know. For example, to compiler C/C++ code in Guix, you absolutely need to be using ‘gcc-toolchain’, or ‘clang-toolchain’, or the implicit inputs that come with ‘gnu-build-system’ & co. All these ensure that the toolchain is properly set up, meaning that Linux headers like <linux/limits.h> will be found, and ‘ld’ will actually be our “ld wrapper”¹, which is responsible for recording the RUNPATH of dependencies, and not Binutils’ ‘ld’. As for ‘luarocks’ being outdated in Guix, my guess is that the set of people contributing to these things is small and an upgrade here would most likely be welcome. HTH! Ludo’. ¹ https://guix.gnu.org/manual/devel/en/html_node/The-GCC-toolchain.html
