tv cgit: use algol_nu highlighting style

This commit is contained in:
tv 2020-07-13 11:39:42 +02:00
parent 53f52bb1b4
commit 2e26408bfe
1 changed files with 23 additions and 0 deletions

View File

@ -5,6 +5,29 @@ with import <stockholm/lib>;
let {
body = {
nixpkgs.config.packageOverrides = super: {
cgit = pkgs.symlinkJoin {
name = "${super.cgit.name}-tv";
paths = [
(pkgs.runCommand "${super.cgit.name}-tv-overrides" {
} /* sh */ ''
mkdir -p $out/lib/cgit/filters
cd $out/lib/cgit/filters
cp \
${super.cgit}/lib/cgit/filters/syntax-highlighting.py \
${super.cgit}/lib/cgit/filters/.syntax-highlighting.py-wrapped \
.
sed -i "s:${super.cgit}:$out:" syntax-highlighting.py
sed -i '
s:^\(formatter =\).*:\1 HtmlFormatter(style="algol_nu"):
' .syntax-highlighting.py-wrapped
'')
super.cgit
];
};
};
krebs.git = {
enable = true;
cgit = {