about summary refs log tree commit diff
path: root/tvix/docs/default.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2021-03-31T22·30+0200
committerflokli <flokli@flokli.de>2021-03-31T22·34+0000
commit3c4e401c9ee9bd837ce6446cd2ddb9b1bed40f8a (patch)
tree0d5cf37c9e70d7bd1e5e57b92737c24f3b2e5382 /tvix/docs/default.nix
parent1fccc23f3cb5bd194310e30ffd9c4376e446251f (diff)
chore(tvix/docs): move from doc r/2378
Most other docs folders in the repo are called `doc` too, let's make
this consistent.

Change-Id: Icd712429b51763076548c977321e370f2a77877e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2741
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'tvix/docs/default.nix')
-rw-r--r--tvix/docs/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/tvix/docs/default.nix b/tvix/docs/default.nix
new file mode 100644
index 000000000000..606027424a11
--- /dev/null
+++ b/tvix/docs/default.nix
@@ -0,0 +1,39 @@
+{ 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";
+  version = "0.1";
+
+  src = lib.cleanSource ./.;
+
+  CSL = csl;
+
+  nativeBuildInputs = [
+    pkgs.pandoc
+    pkgs.plantuml
+    tl
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out
+    cp -v *.html $out/
+    runHook postSubmit
+  '';
+
+}