2020-06-15 01:58:26 +02:00
|
|
|
# For depot projects that make use of syntect (primarily
|
|
|
|
# //tools/cheddar) the included syntax set is taken from bat.
|
|
|
|
#
|
|
|
|
# However, bat lacks some of the syntaxes we are interested in. This
|
|
|
|
# package creates a new binary syntax set which bundles our additional
|
|
|
|
# syntaxes on top of bat's existing ones.
|
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2022-09-26 19:33:05 +02:00
|
|
|
inherit (pkgs) bat runCommand;
|
2020-06-15 01:58:26 +02:00
|
|
|
in
|
2022-09-26 19:33:05 +02:00
|
|
|
runCommand "bat-syntaxes.bin" { } ''
|
2020-06-15 01:58:26 +02:00
|
|
|
export HOME=$PWD
|
|
|
|
mkdir -p .config/bat/syntaxes
|
|
|
|
cp ${./Prolog.sublime-syntax} .config/bat/syntaxes
|
|
|
|
${bat}/bin/bat cache --build
|
|
|
|
mv .cache/bat/syntaxes.bin $out
|
|
|
|
''
|