mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
tests.texlive.opentype-fonts: use mkTeXTest
This commit is contained in:
parent
898681161a
commit
996a94d959
|
@ -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 = [
|
||||
|
|
Loading…
Reference in a new issue