diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix index 217a862e1c56..cb607f3a1328 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; }) diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix index 6876e4090074..255c208783f9 100644 --- a/pkgs/tools/typesetting/tex/texlive/bin.nix +++ b/pkgs/tools/typesetting/tex/texlive/bin.nix @@ -30,6 +30,14 @@ let for i in texk/kpathsea/mktex*; do sed -i '/^mydir=/d' "$i" done + + # ST_NLINK_TRICK causes kpathsea to treat folders with no real subfolders + # as leaves, even if they contain symlinks to other folders; must be + # disabled to work correctly with the nix store", see section 5.3.6 + # “Subdirectory expansion” of the kpathsea manual + # http://mirrors.ctan.org/systems/doc/kpathsea/kpathsea.pdf for more + # details + sed -i '/^#define ST_NLINK_TRICK/d' texk/kpathsea/config.h ''; configureFlags = [