feat(cheddar): Use syntax highlighting assets from bat

This uses Nix to inject the path to the syntax highlighting assets
that ship with the bat source code into the cheddar build at compile
time, where the Rust compiler then inserts it into the binary via
macros.

bat has a lot of custom syntax highlighting definitions that they
collected from all over the place (including for languages like Nix!)
and this makes them accessible to cheddar.

Also if you're reading this, can you just take a moment to appreciate
how incredible it is that Nix just lets us do something like this?!
This commit is contained in:
Vincent Ambo 2019-12-21 04:55:10 +00:00
parent 4681c07bde
commit 81d9b81b06
3 changed files with 21 additions and 2 deletions

View file

@ -22,6 +22,7 @@ let
# of the repo. They become available under `pkgs.third_party.<name>`
inherit (nixpkgs)
bashInteractive
bat
buildGoPackage
cacert
cachix