El 2026-01-13 19:53, Ashvith Shetty escribió:
Hello,I'm having trouble with packaging a Lua library. There seems to be no such thing as a lua-build-system, and most of them have executables, which is not the same as packaging a library. How should I go about packaging a Lua library? How would the structure/skeleton of directory look like? What would go inside of /share, /etc, etc? Do I need to resolve the shebang? By the way, I am trying to package a bunch of game-related libraries (ECS, physics engine, etc) in Lua. Would really appreciate an example for demonstration. Regards, Ashvith
Which library are you trying to package ? In absence of a build system, I would find the closest resembling build system to go with, usually it's gnu-build-system (if they've a Makefile or something), or copy-build-system.
In the absence of guideliness, I would look at how existing libraries are arranged:
% find $(guix build lua-lpeg)
/gnu/store/qq10r7r6ab3ma1qakkgqjlfaxkk1j5pb-lua-lpeg-1.0.2
/gnu/store/qq10r7r6ab3ma1qakkgqjlfaxkk1j5pb-lua-lpeg-1.0.2/lib
/gnu/store/qq10r7r6ab3ma1qakkgqjlfaxkk1j5pb-lua-lpeg-1.0.2/lib/lua
/gnu/store/qq10r7r6ab3ma1qakkgqjlfaxkk1j5pb-lua-lpeg-1.0.2/lib/lua/5.3
/gnu/store/qq10r7r6ab3ma1qakkgqjlfaxkk1j5pb-lua-lpeg-1.0.2/lib/lua/5.3/lpeg.so
/gnu/store/qq10r7r6ab3ma1qakkgqjlfaxkk1j5pb-lua-lpeg-1.0.2/share
/gnu/store/qq10r7r6ab3ma1qakkgqjlfaxkk1j5pb-lua-lpeg-1.0.2/share/lua
/gnu/store/qq10r7r6ab3ma1qakkgqjlfaxkk1j5pb-lua-lpeg-1.0.2/share/lua/5.3
/gnu/store/qq10r7r6ab3ma1qakkgqjlfaxkk1j5pb-lua-lpeg-1.0.2/share/lua/5.3/re.lua
HTH
--
Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0
| GPG: 01DE 145E 35D8 C87E 956E FEC9 D4C4 4BDA 2C98 C654
"If I destroy you, what business is it of yours ?" (Dark Forest, Liu Cixin)
signature.asc
Description: PGP signature
