diff options
author | Florian Klink <flokli@flokli.de> | 2024-03-01T08·56+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-03-03T16·52+0000 |
commit | 65a810fc0b12e754af47864ab3b9d4b5756cde15 (patch) | |
tree | ec69ccf0de3dcd53dc47748f8f2a6a649a85ad48 /tvix/docs/default.nix | |
parent | 6bdaebcb55eef5663f93dbbc8de6a48b459a10c0 (diff) |
feat(tvix/docs): switch to mdbook r/7645
Some of the docs are still outdated (like architecture and drv path inconsistencies). Change-Id: I7a6afceb008ef4cd19a764dd6c637b39fa842a2e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11072 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu>
Diffstat (limited to 'tvix/docs/default.nix')
-rw-r--r-- | tvix/docs/default.nix | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/tvix/docs/default.nix b/tvix/docs/default.nix index 016d641df59f..9fc2f765767a 100644 --- a/tvix/docs/default.nix +++ b/tvix/docs/default.nix @@ -1,47 +1,23 @@ { pkgs, lib, ... }: -let - - tl = pkgs.texlive.combine { - inherit (pkgs.texlive) scheme-medium wrapfig ulem capt-of - titlesec preprint enumitem paralist ctex environ svg - beamer trimspaces zhnumber changepage framed pdfpages - fvextra minted upquote ifplatform xstring; - }; - - csl = pkgs.fetchurl { - name = "numeric.csl"; - url = "https://gist.githubusercontent.com/bwiernik/8c6f39cf51ceb3a03107/raw/1d75c2d62113ffbba6ed03a47ad99bde86934f2b/APA%2520Numeric"; - sha256 = "1yfhhnhbzvhrv93baz98frmgsx5y442nzhb0l956l4j35fb0cc3h"; - }; - -in pkgs.stdenv.mkDerivation { - pname = "tvix-doc"; + pname = "tvix-docs"; version = "0.1"; - outputs = [ "out" "svg" ]; + outputs = [ "out" ]; src = lib.cleanSource ./.; - CSL = csl; - nativeBuildInputs = [ - pkgs.pandoc + pkgs.mdbook + pkgs.mdbook-plantuml pkgs.plantuml - tl ]; - installPhase = '' - runHook preInstall - - mkdir -p $out - cp -v *.html $out/ - - mkdir -p $svg - cp -v *.svg $svg/ - - runHook postSubmit + # 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 ''; - } |