it's a complex plugin so make sense to run its tests.
The official launcher `make test-ci` runs the tests 3 times and tries to
fetch treesitter grammars + plenary so we bypass it since we dont have
network access in the sandbox.
I've removed the failing tests hoping we can work with upstream to fix
that later.
There is a patch in staging enabling strictDeps for lua packages.
I noticed tree-sitter-orgmode failed to patch on recent master with
strictDeps so this is a preemptive fix.
- add bustedCheckHook in the nativeCheckInputs and busted will run when
doCheck is enabled. You can customize its call via "bustedFlags" and
prevent it from running with "dontBustedCheck". If "nlua" is
available, busted will automatically run busted with nlua as
interpreter (already done in lux). Goal is to standardize the writing
of tests so that if feels less like copy & paste.
- removed the default checkPhase from buildLuarocksPackage which was
running "luarocks test". None of the plugins was using as far as I
know because no plugin out there (maybe 2 or 3) uses that ? it could
be considered a breaking change but in practice I dont think it is.
these are leaf packages, lua-cmsgpack hasn't seen a release in > 7 years
so not excited to fix/patch things.
I would probably remove those but in absence of maintainers I am not
sure. And they still work with puc lua so let's keep those in.
in the end, it enables only 2 tests so less sexy than I anticipated but
we can hope it improves. The nix builds helps selecting tests that
require network access.
Fixed up the HTML report generation capability of the `luacov` Lua
package. It is not entirely clear to me whether this used to work, and
got broken at some point, or whether it never worked.
The issue is that `luacov` uses the `datafile` rock to resolve its
static files for HTML reports (such as `prettier.js`, `report.css`,
etc.), which does not properly work in a Nix environment. This is
because `datafile` relies on the specific structure of the usual
LuaRocks directory to scan for files, which `nixpkgs` messes with.
Since we can't rely on `datafile` to detect a LuaRocks environment, I've
added a manual copy step to the derivation, merging the static files
with the other Lua files. We can then utilize the source-relative opener
to find the appropriate files.