about summary refs log tree commit diff
path: root/tvix/docs/default.nix
blob: 3b102e4b7ce26dbb8cd4f11079198c7ab5b931ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ pkgs, lib, ... }:

pkgs.stdenv.mkDerivation {
  pname = "tvix-docs";
  version = "0.1";

  outputs = [ "out" ];

  src = lib.cleanSource ./.;

  nativeBuildInputs = [
    pkgs.d2
    pkgs.mdbook
    pkgs.mdbook-admonish
    pkgs.mdbook-d2
    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
  '';
}