git.iko.soy/typeable/nixpkgs
on master help sign in
lua.lib: small fix

to avoid the error 'cfg.root_dir is null' see https://github.com/luarocks/luarocks/issues/1161 for details

commit0986a70be6219a1986f3665ec1a3afd870ab8e14 authorMatthieu Coudron <mcoudron@hotmail.com> dateTue 29 Mar 2022, 03:48 (5 years ago) parent2e5732b
1 file changed+5−2
pkgs/development/lua-modules/lib.nix+5−2
pkgs/development/lua-modules/lib.nix+5−2
@@ -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 ''