@@ -82,6 +82,8 @@ rec {
8282 */
8383 generateLuarocksConfig = {
8484 externalDeps
85+
86+ # a list of lua derivations
8587 , requiredLuaRocks
8688 , extraVariables ? {}
8789 , rocksSubdir
@@ -113,9 +115,10 @@ rec {
113115 -- To prevent collisions when creating environments, we install the rock
114116 -- files into per-package subdirectories
115117 rocks_subdir = '${rocksSubdir}'
116− -- Then we need to tell luarocks where to find the rock files per
117− -- dependency
118+ -- first tree is the default target where new rocks are installed,
119+ -- any other trees in the list are treated as additional sources of installed rocks for matching dependencies.
118120 rocks_trees = {
121+ {name = "current", root = '${placeholder "out"}', rocks_dir = "current" },
119122 ${lib.concatStringsSep "\n, " rocksTrees}
120123 }
121124 '' + lib.optionalString lua.pkgs.isLuaJIT ''