From cba748e94e69e1839432d33d81fa81d4159fd76f Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Tue, 7 Jun 2022 16:46:23 +0200 Subject: [PATCH] fix(build): user basic texlive package with required packages only --- nix/docker/default.nix | 5 ++++- shell.nix | 10 +++++++++- src/Handler/Admin/Test.hs | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/nix/docker/default.nix b/nix/docker/default.nix index 9fec469d5..da4a81d90 100644 --- a/nix/docker/default.nix +++ b/nix/docker/default.nix @@ -22,8 +22,11 @@ let uniworx.uniworx.components.exes.uniworx prev.dockerTools.binSh findutils coreutils 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.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! curl wget netcat # just for manual testing within the pod, remove for production! openldap # just for manual testing within the pod, remove for production! diff --git a/shell.nix b/shell.nix index b979dbf80..119972679 100644 --- a/shell.nix +++ b/shell.nix @@ -71,6 +71,14 @@ let in pkgs.mkShell { name = "uni2work"; 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 ]); } diff --git a/src/Handler/Admin/Test.hs b/src/Handler/Admin/Test.hs index 32230be1a..014700130 100644 --- a/src/Handler/Admin/Test.hs +++ b/src/Handler/Admin/Test.hs @@ -285,8 +285,8 @@ getAdminTestPdfR = do texopts = [] writeropts = def { P.writerTemplate = Just tmpl } doc <- P.readMarkdown def md - 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 "pdflatex" texopts P.writeLaTeX writeropts doc -- xcolor.sty not found + P.makePDF "lualatex" texopts P.writeLaTeX writeropts doc -- unicode-math.sty not found case content of Right (Right bs) -> do liftIO $ L.writeFile "generated.pdf" bs