Help creating Lua package in nix-shell

I’m trying to create a lua package for RayLua.
I’ve posted on SO, but am not getting any traction.

I’d really appreciate some help getting this nix-shell/package going.

I have a package for raylib that works, albeit it is not merged.
I’m currently using that raylib package as part of a nix-shell:

I’ve created a github gist to try and make the layout a bit clearer.

To work, I just need the raylua.lua file placed somewhere that Lua can find it (on LUA_PATH).
Then I need to update the import in raylua.lua to change “lib” from “./libraylib.so” to “libraylib”. This should then look for the .so on LUA_CPATH. However, I have tried to do this manually and it doesn’t seem to work.

Since there’s no compilation step, I imagine this is reasonably trivial, but I’m very new to packaging and am quite lost as to how to package a Lua lib.