about summary refs log tree commit diff
path: root/pkgs/test/texlive
diff options
context:
space:
mode:
authorapfelkuchen06 <apfelkuchen@hrnz.li>2023-03-08 23:37:01 +0100
committerapfelkuchen06 <apfelkuchen@hrnz.li>2023-03-08 23:37:01 +0100
commitd4a78d5f094e0c837b9104f0cd3a4fb2cf966932 (patch)
tree31c847a27fc2b8af50b59812790b19e436d95bdc /pkgs/test/texlive
parent0c009e1824a56da4f0ac6284111cf786b4e8af96 (diff)
texlive: add test for lualatex fonts
Diffstat (limited to 'pkgs/test/texlive')
-rw-r--r--pkgs/test/texlive/default.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix
index 217a862e1c563..cb607f3a1328e 100644
--- a/pkgs/test/texlive/default.nix
+++ b/pkgs/test/texlive/default.nix
@@ -1,6 +1,26 @@
 { lib, runCommand, fetchurl, file, texlive, writeShellScript }:
 
 {
+
+  luaotfload-fonts = runCommand "texlive-test-lualatex" {
+    nativeBuildInputs = [
+      (with texlive; combine { inherit scheme-medium libertinus-fonts; })
+    ];
+    input = builtins.toFile "lualatex-testfile.tex" ''
+      \documentclass{article}
+      \usepackage{fontspec}
+      \setmainfont{Libertinus Serif}
+      \begin{document}
+        \LaTeX{} is great
+      \end{document}
+    '';
+  }
+  ''
+    export HOME="$(mktemp -d)"
+    lualatex -halt-on-error "$input"
+    echo success > $out
+  '';
+
   chktex = runCommand "texlive-test-chktex" {
     nativeBuildInputs = [
       (with texlive; combine { inherit scheme-infraonly chktex; })