Loading pkgs/development/lua-modules/lib.nix +21 −21 Original line number Diff line number Diff line Loading @@ -109,31 +109,31 @@ rec { externalDepsDirs = map (x: builtins.toString x) (lib.filter (lib.isDerivation) externalDeps); in '' local_cache = "" -- To prevent collisions when creating environments, we install the rock -- files into per-package subdirectories rocks_subdir = ${toLua {} rocksSubdir} -- first tree is the default target where new rocks are installed, -- any other trees in the list are treated as additional sources of installed rocks for matching dependencies. rocks_trees = ${toLua {} ( in toLua { asBindings = true; } ({ local_cache = ""; # To prevent collisions when creating environments, we install the rock # files into per-package subdirectories rocks_subdir = rocksSubdir; # first tree is the default target where new rocks are installed, # any other trees in the list are treated as additional sources of installed rocks for matching dependencies. rocks_trees = ( [{name = "current"; root = "${placeholder "out"}"; rocks_dir = "current"; }] ++ rocksTrees )} '' + lib.optionalString lua.pkgs.isLuaJIT '' -- Luajit provides some additional functionality built-in; this exposes -- that to luarock's dependency system rocks_provided = ${toLua {} { ); } // lib.optionalAttrs lua.pkgs.isLuaJIT { # Luajit provides some additional functionality built-in; this exposes # that to luarock's dependency system rocks_provided = { jit = "${lua.luaversion}-1"; ffi = "${lua.luaversion}-1"; luaffi = "${lua.luaversion}-1"; bit = "${lua.luaversion}-1"; }} '' + '' -- For single-output external dependencies external_deps_dirs = ${toLua {} externalDepsDirs} -- Some needed machinery to handle multiple-output external dependencies, -- as per https://github.com/luarocks/luarocks/issues/766 variables = ${toLua {} (depVariables // extraVariables)} ''; }; } // { # For single-output external dependencies external_deps_dirs = externalDepsDirs; # Some needed machinery to handle multiple-output external dependencies, # as per https://github.com/luarocks/luarocks/issues/766 variables = (depVariables // extraVariables); }); } Loading
pkgs/development/lua-modules/lib.nix +21 −21 Original line number Diff line number Diff line Loading @@ -109,31 +109,31 @@ rec { externalDepsDirs = map (x: builtins.toString x) (lib.filter (lib.isDerivation) externalDeps); in '' local_cache = "" -- To prevent collisions when creating environments, we install the rock -- files into per-package subdirectories rocks_subdir = ${toLua {} rocksSubdir} -- first tree is the default target where new rocks are installed, -- any other trees in the list are treated as additional sources of installed rocks for matching dependencies. rocks_trees = ${toLua {} ( in toLua { asBindings = true; } ({ local_cache = ""; # To prevent collisions when creating environments, we install the rock # files into per-package subdirectories rocks_subdir = rocksSubdir; # first tree is the default target where new rocks are installed, # any other trees in the list are treated as additional sources of installed rocks for matching dependencies. rocks_trees = ( [{name = "current"; root = "${placeholder "out"}"; rocks_dir = "current"; }] ++ rocksTrees )} '' + lib.optionalString lua.pkgs.isLuaJIT '' -- Luajit provides some additional functionality built-in; this exposes -- that to luarock's dependency system rocks_provided = ${toLua {} { ); } // lib.optionalAttrs lua.pkgs.isLuaJIT { # Luajit provides some additional functionality built-in; this exposes # that to luarock's dependency system rocks_provided = { jit = "${lua.luaversion}-1"; ffi = "${lua.luaversion}-1"; luaffi = "${lua.luaversion}-1"; bit = "${lua.luaversion}-1"; }} '' + '' -- For single-output external dependencies external_deps_dirs = ${toLua {} externalDepsDirs} -- Some needed machinery to handle multiple-output external dependencies, -- as per https://github.com/luarocks/luarocks/issues/766 variables = ${toLua {} (depVariables // extraVariables)} ''; }; } // { # For single-output external dependencies external_deps_dirs = externalDepsDirs; # Some needed machinery to handle multiple-output external dependencies, # as per https://github.com/luarocks/luarocks/issues/766 variables = (depVariables // extraVariables); }); }