diff options
author | tv <tv@krebsco.de> | 2020-07-13 11:39:42 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2020-07-13 11:39:42 +0200 |
commit | d79e9f0159ad3a8e793405b33205f15d9cc19b01 (patch) | |
tree | cce5eafc408ca424a3abcb2cddb62cd3697a15a3 /tv/2configs | |
parent | 9609d04718571c9265d9673f87e010432f99f01e (diff) |
tv cgit: use algol_nu highlighting style
Diffstat (limited to 'tv/2configs')
-rw-r--r-- | tv/2configs/gitrepos.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 10bfb50..59090c8 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -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 = { |