mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
tests.texlive.opentype-fonts: use mkTeXTest
This commit is contained in:
parent
898681161a
commit
996a94d959
|
@ -36,11 +36,15 @@ 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" ''
|
||||
# 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}
|
||||
|
@ -48,18 +52,12 @@ rec {
|
|||
\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
|
||||
'';
|
||||
};
|
||||
xelatex = lualatex.override {
|
||||
name = "opentype-fonts-xelatex";
|
||||
format = "xelatex";
|
||||
};
|
||||
};
|
||||
|
||||
chktex = runCommand "texlive-test-chktex" {
|
||||
nativeBuildInputs = [
|
||||
|
|
Loading…
Reference in a new issue