about summary refs log tree commit diff
path: root/tools/cheddar/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-14T23·19+0100
committertazjin <mail@tazj.in>2020-06-15T16·52+0000
commit9885b70b7aa8e90da930a2cab2af9318d4bede88 (patch)
tree2b91561ba2c6ee8ae0d9661ca5225b4ec675118c /tools/cheddar/default.nix
parent0b95b8632d142496b9443e0570eff62958518ff7 (diff)
feat(cheddar): Override syntax highlighting for 'rules.pl' to Prolog r/967
Adds a mechanism for per-filename overrides of the chosen language
syntax and configures it for Gerrit's submit rule file.

This also switches the syntax set used to the one from
//third_party/bat_syntaxes, which contains custom additions such as
Prolog support.

Change-Id: I2023dbad5b326305ef2ef0ecf34ef66a3f7575ab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/349
Reviewed-by: riking <rikingcoding@gmail.com>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Diffstat (limited to 'tools/cheddar/default.nix')
-rw-r--r--tools/cheddar/default.nix15
1 files changed, 6 insertions, 9 deletions
diff --git a/tools/cheddar/default.nix b/tools/cheddar/default.nix
index 5c86fec48283..c65c782e6ac8 100644
--- a/tools/cheddar/default.nix
+++ b/tools/cheddar/default.nix
@@ -1,20 +1,17 @@
-{ depot, ... }:
+{ pkgs, ... }:
 
-with depot.third_party;
-
-naersk.buildPackage {
+pkgs.naersk.buildPackage {
   src = ./.;
   doDoc = false;
   doCheck = false;
 
   override = x: {
-    # bat contains syntax highlighting packages for a lot more
-    # languages than what ships with syntect, and we can make use of
-    # them!
-    BAT_SYNTAXES = "${bat.src}/assets/syntaxes.bin";
+    # Use our custom bat syntax set, which is everything from upstream,
+    # plus additional languages we care about.
+    BAT_SYNTAXES = "${pkgs.bat_syntaxes}";
 
     # LLVM packages (why are they even required?) are not found
     # automatically if added to buildInputs, hence this ...
-    LIBCLANG_PATH = "${llvmPackages.libclang}/lib/libclang.so.10";
+    LIBCLANG_PATH = "${pkgs.llvmPackages.libclang}/lib/libclang.so.10";
   };
 }