about summary refs log tree commit diff
path: root/tvix/docs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/docs/default.nix')
-rw-r--r--tvix/docs/default.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/tvix/docs/default.nix b/tvix/docs/default.nix
new file mode 100644
index 000000000000..9fc2f765767a
--- /dev/null
+++ b/tvix/docs/default.nix
@@ -0,0 +1,23 @@
+{ pkgs, lib, ... }:
+
+pkgs.stdenv.mkDerivation {
+  pname = "tvix-docs";
+  version = "0.1";
+
+  outputs = [ "out" ];
+
+  src = lib.cleanSource ./.;
+
+  nativeBuildInputs = [
+    pkgs.mdbook
+    pkgs.mdbook-plantuml
+    pkgs.plantuml
+  ];
+
+  # plantuml wants to create ./.mdbook-plantuml-cache, which fails as $src is r/o.
+  # copy all sources elsewhere to workaround.
+  buildCommand = ''
+    cp -R $src/. .
+    mdbook build -d $out
+  '';
+}