Merge branch 'demo-pandoc'

This commit is contained in:
Steffen Jost 2022-06-07 17:49:26 +02:00
commit 0778548285
3 changed files with 15 additions and 4 deletions

View File

@ -22,8 +22,11 @@ let
uniworx.uniworx.components.exes.uniworx uniworx.uniworx.components.exes.uniworx
prev.dockerTools.binSh findutils coreutils prev.dockerTools.binSh findutils coreutils
cups # needed for interface with print center cups # needed for interface with print center
texlive.combined.scheme-medium # Causes container to be too large! However, might be needed by the pandoc library to produce PDFs, but nix ought to include the necessary parts already #texlive.combined.scheme-medium # Causes container to be too large! However, might be needed by the pandoc library to produce PDFs, but nix ought to include the necessary parts already
#texlive.combined.scheme-basic # for PDFLaTeX for pandoc PDF creation #texlive.combined.scheme-basic # for PDFLaTeX for pandoc PDF creation
(texlive.combine {
inherit (texlive) scheme-basic xcolor unicode-math;
})
# pandoc # just for manual testing within the pod, remove for production, since we use the library instead! # pandoc # just for manual testing within the pod, remove for production, since we use the library instead!
curl wget netcat # just for manual testing within the pod, remove for production! curl wget netcat # just for manual testing within the pod, remove for production!
openldap # just for manual testing within the pod, remove for production! openldap # just for manual testing within the pod, remove for production!

View File

@ -71,6 +71,14 @@ let
in pkgs.mkShell { in pkgs.mkShell {
name = "uni2work"; name = "uni2work";
nativeBuildInputs = [develop inDevelop killallUni2work diffRunning] nativeBuildInputs = [develop inDevelop killallUni2work diffRunning]
++ (with pkgs; [ nodejs-14_x postgresql_12 openldap google-chrome exiftool memcached minio minio-client gup skopeo texlive.combined.scheme-medium ]) ++ (with pkgs;
[ nodejs-14_x postgresql_12 openldap google-chrome exiftool memcached minio minio-client
gup skopeo
# texlive.combined.scheme-small
(texlive.combine {
inherit (texlive) scheme-basic xcolor unicode-math;
})
]
)
++ (with pkgs.haskellPackages; [ stack yesod-bin hlint cabal-install weeder profiteur ]); ++ (with pkgs.haskellPackages; [ stack yesod-bin hlint cabal-install weeder profiteur ]);
} }

View File

@ -285,8 +285,8 @@ getAdminTestPdfR = do
texopts = [] texopts = []
writeropts = def { P.writerTemplate = Just tmpl } writeropts = def { P.writerTemplate = Just tmpl }
doc <- P.readMarkdown def md doc <- P.readMarkdown def md
P.makePDF "pdflatex" texopts P.writeLaTeX writeropts doc -- xcolor.sty not found -- P.makePDF "pdflatex" texopts P.writeLaTeX writeropts doc -- xcolor.sty not found
-- P.makePDF "lualatex" texopts P.writeLaTeX writeropts doc -- unicode-math.sty not found P.makePDF "lualatex" texopts P.writeLaTeX writeropts doc -- unicode-math.sty not found
case content of case content of
Right (Right bs) -> do Right (Right bs) -> do
liftIO $ L.writeFile "generated.pdf" bs liftIO $ L.writeFile "generated.pdf" bs