This repository has been archived on 2024-05-03. You can view files and clone it, but cannot push or open issues or pull requests.
treefmt/nix/docs.nix

32 lines
679 B
Nix
Raw Normal View History

_: {
perSystem = {pkgs, ...}: {
devshells.default = {
commands = let
category = "docs";
in [
{
inherit category;
package = pkgs.nodejs;
}
{
inherit category;
package = pkgs.vhs;
help = "generate terminal gifs";
}
{
category = "docs";
help = "regenerate gifs for docs";
name = "gifs";
command = ''
set -xeuo pipefail
for tape in $PRJ_ROOT/docs/vhs/*; do
vhs $tape -o "$PRJ_ROOT/docs/public/$(basename $tape .tape).gif"
done
'';
}
];
};
};
}