tvl-depot/tvix/docs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
491 B
Nix
Raw Normal View History

{ 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
'';
}