7 -- |
7 -- |
8 |
8 |
9 module("dependencies", package.seeall) |
9 module("dependencies", package.seeall) |
10 |
10 |
11 function softreq(...) local ok, lib = pcall(require, ...); if ok then return lib; else return nil, lib; end end |
11 function softreq(...) local ok, lib = pcall(require, ...); if ok then return lib; else return nil, lib; end end |
|
12 |
|
13 -- Required to be able to find packages installed with luarocks |
|
14 if not softreq "luarocks.loader" then -- LuaRocks 2.x |
|
15 softreq "luarocks.require"; -- LuaRocks <1.x |
|
16 end |
12 |
17 |
13 function missingdep(name, sources, msg) |
18 function missingdep(name, sources, msg) |
14 print(""); |
19 print(""); |
15 print("**************************"); |
20 print("**************************"); |
16 print("Prosody was unable to find "..tostring(name)); |
21 print("Prosody was unable to find "..tostring(name)); |