2021-03-31 20:49:09 +02:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
tl = pkgs.texlive.combine {
|
|
|
|
inherit (pkgs.texlive) scheme-medium wrapfig ulem capt-of
|
2022-01-30 17:06:58 +01:00
|
|
|
titlesec preprint enumitem paralist ctex environ svg
|
|
|
|
beamer trimspaces zhnumber changepage framed pdfpages
|
|
|
|
fvextra minted upquote ifplatform xstring;
|
2021-03-31 20:49:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
csl = pkgs.fetchurl {
|
|
|
|
name = "numeric.csl";
|
|
|
|
url = "https://gist.githubusercontent.com/bwiernik/8c6f39cf51ceb3a03107/raw/1d75c2d62113ffbba6ed03a47ad99bde86934f2b/APA%2520Numeric";
|
|
|
|
sha256 = "1yfhhnhbzvhrv93baz98frmgsx5y442nzhb0l956l4j35fb0cc3h";
|
|
|
|
};
|
|
|
|
|
2022-01-30 17:06:58 +01:00
|
|
|
in
|
|
|
|
pkgs.stdenv.mkDerivation {
|
2021-03-31 20:49:09 +02:00
|
|
|
pname = "tvix-doc";
|
|
|
|
version = "0.1";
|
|
|
|
|
2021-04-01 00:35:04 +02:00
|
|
|
outputs = [ "out" "svg" ];
|
|
|
|
|
2021-03-31 20:49:09 +02:00
|
|
|
src = lib.cleanSource ./.;
|
|
|
|
|
|
|
|
CSL = csl;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgs.pandoc
|
|
|
|
pkgs.plantuml
|
|
|
|
tl
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2021-04-01 00:35:04 +02:00
|
|
|
|
2021-03-31 20:49:09 +02:00
|
|
|
mkdir -p $out
|
|
|
|
cp -v *.html $out/
|
2021-04-01 00:35:04 +02:00
|
|
|
|
|
|
|
mkdir -p $svg
|
|
|
|
cp -v *.svg $svg/
|
|
|
|
|
2021-03-31 20:49:09 +02:00
|
|
|
runHook postSubmit
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|