2024-05-07 11:23:03 +00:00
|
|
|
{
|
|
|
|
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-05-07 11:23:03 +00:00
|
|
|
...
|
|
|
|
}:
|
2024-04-24 12:44:43 +00:00
|
|
|
let
|
|
|
|
uml-c4 = pkgs.python3Packages.plantuml-markdown.override { plantuml = pkgs.plantuml-c4; };
|
|
|
|
in
|
2024-04-12 13:22:20 +00:00
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
name = "clan-documentation";
|
|
|
|
|
2024-04-13 12:42:37 +00:00
|
|
|
src = ../.;
|
2024-04-12 13:22:20 +00:00
|
|
|
|
|
|
|
nativeBuildInputs =
|
2024-04-24 12:44:43 +00:00
|
|
|
[
|
|
|
|
pkgs.python3
|
|
|
|
uml-c4
|
|
|
|
]
|
2024-04-12 13:22:20 +00:00
|
|
|
++ (with pkgs.python3Packages; [
|
|
|
|
mkdocs
|
|
|
|
mkdocs-material
|
2024-05-16 13:08:24 +00:00
|
|
|
mkdocs-rss-plugin
|
|
|
|
mkdocs-macros
|
2024-04-12 13:22:20 +00:00
|
|
|
]);
|
2024-04-16 17:06:45 +00:00
|
|
|
configurePhase = ''
|
2024-05-07 11:23:03 +00:00
|
|
|
mkdir -p ./site/reference/cli
|
2024-04-16 17:06:45 +00:00
|
|
|
cp -af ${module-docs}/* ./site/reference/
|
2024-05-07 11:23:03 +00:00
|
|
|
cp -af ${clan-cli-docs}/* ./site/reference/cli/
|
2024-05-24 14:54:51 +00:00
|
|
|
|
|
|
|
mkdir -p ./site/static/asciinema-player
|
|
|
|
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
|
|
|
'';
|
2024-04-12 13:22:20 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mkdocs build --strict
|
|
|
|
ls -la .
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2024-04-13 17:39:11 +00:00
|
|
|
cp -a out/ $out/
|
2024-04-12 13:22:20 +00:00
|
|
|
'';
|
|
|
|
}
|