diff --git a/tvix/docs/book.toml b/tvix/docs/book.toml index 10a26f3ff..a5dacc46e 100644 --- a/tvix/docs/book.toml +++ b/tvix/docs/book.toml @@ -15,6 +15,10 @@ command = "mdbook-admonish" after = ["links"] # ensure `{{#include}}` also gets processed assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install` +[preprocessor.d2] +command = "d2" +after = ["links"] # ensure `{{#include}}` also gets processed + [output] [output.html] diff --git a/tvix/docs/default.nix b/tvix/docs/default.nix index 27a253f3e..3b102e4b7 100644 --- a/tvix/docs/default.nix +++ b/tvix/docs/default.nix @@ -9,8 +9,10 @@ pkgs.stdenv.mkDerivation { src = lib.cleanSource ./.; nativeBuildInputs = [ + pkgs.d2 pkgs.mdbook pkgs.mdbook-admonish + pkgs.mdbook-d2 pkgs.mdbook-plantuml pkgs.plantuml ]; diff --git a/tvix/shell.nix b/tvix/shell.nix index 0317237bb..eae0931bf 100644 --- a/tvix/shell.nix +++ b/tvix/shell.nix @@ -30,6 +30,7 @@ pkgs.mkShell { pkgs.cargo-machete pkgs.cargo-expand pkgs.clippy + pkgs.d2 pkgs.evans pkgs.fuse pkgs.go @@ -37,6 +38,7 @@ pkgs.mkShell { pkgs.hyperfine pkgs.mdbook pkgs.mdbook-admonish + pkgs.mdbook-d2 pkgs.mdbook-plantuml pkgs.nix_2_3 # b/313 pkgs.pkg-config