summaryrefslogtreecommitdiffstats
path: root/pkgs/simple/cgit-about-filter/default.nix
blob: 14b9aa9edf4394ff76326d4f5f0708364c609a98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{ gitMinimal, lib, luajit, md4c, replaceVarsWith }:

replaceVarsWith {
  src = ./cgit-about-filter.lua;
  replacements = {
    git = lib.getExe gitMinimal;
    md2html = lib.getExe md4c;
  };
  # cgit runs Lua filters with LuaJIT.  It reports errors in them only as
  # an error page, which ends up in the cache rather than the response.
  postCheck = ''
    ${lib.getExe luajit} -b "$target" /dev/null
  '';
}