···139139[luarocks2nix](https://github.com/nix-community/luarocks) is a tool capable of generating nix derivations from both rockspec and src.rock (and favors the src.rock).
140140The automation only goes so far though and some packages need to be customized.
141141These customizations go in `pkgs/development/lua-modules/overrides.nix`.
142142-For instance if the rockspec defines `external_dependencies`, these need to be manually added in its rockspec file then it won't work.
142142+For instance if the rockspec defines `external_dependencies`, these need to be manually added to the overrides.nix.
143143144144You can try converting luarocks packages to nix packages with the command `nix-shell -p luarocks-nix` and then `luarocks nix PKG_NAME`.
145145-Nix rely on luarocks to install lua packages, basically it runs:
146146-`luarocks make --deps-mode=none --tree $out`
147145148146#### Packaging a library manually {#packaging-a-library-manually}
149147···161159162160### Lua interpreters {#lua-interpreters}
163161164164-Versions 5.1, 5.2 and 5.3 of the lua interpreter are available as
165165-respectively `lua5_1`, `lua5_2` and `lua5_3`. Luajit is available too.
162162+Versions 5.1, 5.2, 5.3 and 5.4 of the lua interpreter are available as
163163+respectively `lua5_1`, `lua5_2`, `lua5_3` and `lua5_4`. Luajit is available too.
166164The Nix expressions for the interpreters can be found in `pkgs/development/interpreters/lua-5`.
167165168166#### Attributes on lua interpreters packages {#attributes-on-lua-interpreters-packages}