> ... but I need to think this through calmly.

Ok, then let's take a step back. Please tell me when you have made a plan ...

> IIRC it doesn't edit package.path permanently but it scans existing rocks trees to find dependencies...

That sounds like a very elegant approach ...

> For when LuaRocks is packaged by distros and installed by the system package manager.

Good point.