clan-core/docs/nix/shell.nix

32 lines
821 B
Nix
Raw Normal View History

2024-04-16 17:06:45 +00:00
{
docs,
pkgs,
module-docs,
clan-cli-docs,
2024-05-24 14:54:51 +00:00
asciinema-player-js,
asciinema-player-css,
2024-05-28 14:58:59 +00:00
roboto,
fira-code,
2024-04-16 17:06:45 +00:00
...
}:
pkgs.mkShell {
inputsFrom = [ docs ];
shellHook = ''
mkdir -p ./site/reference/cli
2024-04-16 17:06:45 +00:00
cp -af ${module-docs}/* ./site/reference/
cp -af ${clan-cli-docs}/* ./site/reference/cli/
2024-04-16 17:06:45 +00:00
chmod +w ./site/reference/*
echo "Generated API documentation in './site/reference/' "
2024-05-24 14:54:51 +00:00
mkdir -p ./site/static/asciinema-player
2024-05-28 14:58:59 +00:00
2024-05-24 14:54:51 +00:00
ln -snf ${asciinema-player-js} ./site/static/asciinema-player/asciinema-player.min.js
ln -snf ${asciinema-player-css} ./site/static/asciinema-player/asciinema-player.css
2024-05-28 14:58:59 +00:00
# Link to fonts
ln -snf ${roboto}/share/fonts/truetype/Roboto-Regular.ttf ./site/static/
ln -snf ${fira-code}/share/fonts/truetype/FiraCode-VF.ttf ./site/static/
2024-04-16 17:06:45 +00:00
'';
}