about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-06-13T18·57+0300
committerclbot <clbot@tvl.fyi>2024-06-14T07·04+0000
commitadc7353bd16d07e13efb7f6a84b9f93601a07705 (patch)
treed9433cc25d2e6e67ad6666b3b3fff54457560b1e /tvix
parent4df3284dd0766599148a4a34df59441e9d4dfe70 (diff)
feat(tvix/docs): add d2 support r/8268
This provides a nicer syntax to draw some diagrams.

Change-Id: I2ab580e61399a45f01ed422ee29382e860753ffa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11807
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/docs/book.toml4
-rw-r--r--tvix/docs/default.nix2
-rw-r--r--tvix/shell.nix2
3 files changed, 8 insertions, 0 deletions
diff --git a/tvix/docs/book.toml b/tvix/docs/book.toml
index 10a26f3ff4c0..a5dacc46ed69 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 27a253f3e311..3b102e4b7ce2 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 0317237bb2bf..eae0931bfd09 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