diff options
author | Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> | 2023-08-26 13:37:30 +0100 |
---|---|---|
committer | Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> | 2023-08-26 13:37:30 +0100 |
commit | 996a94d959672c9e17df20b4e800ea2b229be93b (patch) | |
tree | ca8b4df94c58c31c2bcbc79706623667d5c39fc6 /pkgs/test | |
parent | 898681161a7620d6bd6c7d2c256146d0aa8b185d (diff) |
tests.texlive.opentype-fonts: use mkTeXTest
Diffstat (limited to 'pkgs/test')
-rw-r--r-- | pkgs/test/texlive/default.nix | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix index 5ad1589704371..d206ab7bdee45 100644 --- a/pkgs/test/texlive/default.nix +++ b/pkgs/test/texlive/default.nix @@ -36,30 +36,28 @@ rec { diff -u "''${nixpkgsTlpdbNix}" "''${tlpdbNix}" | tee "$out/tlpdb.nix.patch" ''; - opentype-fonts = runCommand "texlive-test-opentype" { - nativeBuildInputs = [ - (with texlive; combine { inherit scheme-medium libertinus-fonts; }) - ]; - input = builtins.toFile "opentype-testfile.tex" '' - \documentclass{article} - \usepackage{fontspec} - \setmainfont{Libertinus Serif} - \begin{document} - \LaTeX{} is great - \end{document} - ''; - } - '' - export HOME="$(mktemp -d)" - # We use the same testfile to test two completely different - # font discovery mechanisms, both of which were once broken: - # - lualatex uses its own luaotfload script (#220228) - # - xelatex uses fontconfig (#228196) - # both of the following two commands need to succeed. - lualatex -halt-on-error "$input" - xelatex -halt-on-error "$input" - echo success > $out - ''; + # test two completely different font discovery mechanisms, both of which were once broken: + # - lualatex uses its own luaotfload script (#220228) + # - xelatex uses fontconfig (#228196) + opentype-fonts = lib.recurseIntoAttrs rec { + lualatex = mkTeXTest { + name = "opentype-fonts-lualatex"; + format = "lualatex"; + texLive = texlive.combine { inherit (texlive) scheme-medium libertinus-fonts; }; + text = '' + \documentclass{article} + \usepackage{fontspec} + \setmainfont{Libertinus Serif} + \begin{document} + \LaTeX{} is great + \end{document} + ''; + }; + xelatex = lualatex.override { + name = "opentype-fonts-xelatex"; + format = "xelatex"; + }; + }; chktex = runCommand "texlive-test-chktex" { nativeBuildInputs = [ |