Loading
luaPackages.luacov: fix HTML report generation
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.