about summary refs log tree commit diff
path: root/tools/cheddar/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cheddar/default.nix')
-rw-r--r--tools/cheddar/default.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/cheddar/default.nix b/tools/cheddar/default.nix
new file mode 100644
index 000000000000..17efae91ff89
--- /dev/null
+++ b/tools/cheddar/default.nix
@@ -0,0 +1,23 @@
+{ depot, pkgs, ... }:
+
+depot.third_party.naersk.buildPackage {
+  src = ./.;
+  doDoc = false;
+
+  override = x: {
+    # Use our custom bat syntax set, which is everything from upstream,
+    # 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.ci.targets = [
+    "about-filter"
+  ];
+}