refactor: expose cheddar-about script from cheddar
Any other cgit configuration in depot would need this script wrapper as well. Change-Id: Ifa04e1c9de9c925eb3f60c5d3854221ae02ef06c Reviewed-on: https://cl.tvl.fyi/c/depot/+/5206 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
e2238d6315
commit
32da9861d5
2 changed files with 12 additions and 4 deletions
|
@ -9,4 +9,15 @@ depot.third_party.naersk.buildPackage {
|
|||
# plus additional languages we care about.
|
||||
BAT_SYNTAXES = "${depot.third_party.bat_syntaxes}";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
# Wrapper for cgit which can't be told to pass arguments to a filter
|
||||
about-filter = pkgs.writeShellScriptBin "cheddar-about" ''
|
||||
exec ${depot.tools.cheddar}/bin/cheddar --about-filter $@
|
||||
'';
|
||||
};
|
||||
|
||||
meta.targets = [
|
||||
"about-filter"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -10,15 +10,12 @@ let
|
|||
writeText
|
||||
;
|
||||
|
||||
sourceFilter = writeShellScriptBin "cheddar-about" ''
|
||||
exec ${depot.tools.cheddar}/bin/cheddar --about-filter $@
|
||||
'';
|
||||
cgitConfig = writeText "cgitrc" ''
|
||||
# Global configuration
|
||||
virtual-root=/
|
||||
enable-http-clone=0
|
||||
readme=:README.md
|
||||
about-filter=${sourceFilter}/bin/cheddar-about
|
||||
about-filter=${depot.tools.cheddar.about-filter}/bin/cheddar-about
|
||||
source-filter=${depot.tools.cheddar}/bin/cheddar
|
||||
enable-log-filecount=1
|
||||
enable-log-linecount=1
|
||||
|
|
Loading…
Reference in a new issue