2023-12-16 15:42:50 +00:00
|
|
|
{ lib, runCommand, junicode, texliveBasic }:
|
|
|
|
let
|
|
|
|
texliveWithJunicode = texliveBasic.withPackages (p: [ p.xetex junicode ]);
|
|
|
|
|
2024-01-08 11:17:42 +00:00
|
|
|
texTest = { package, tex, fonttype, file }:
|
|
|
|
lib.attrsets.nameValuePair "${package}-${tex}-${fonttype}" (
|
|
|
|
runCommand "${package}-test-${tex}-${fonttype}.pdf"
|
|
|
|
{
|
2023-12-16 15:42:50 +00:00
|
|
|
nativeBuildInputs = [ texliveWithJunicode ];
|
2024-01-08 11:17:42 +00:00
|
|
|
inherit tex fonttype file;
|
2023-12-16 15:42:50 +00:00
|
|
|
} ''
|
2024-01-08 11:17:42 +00:00
|
|
|
substituteAll $file test.tex
|
2023-12-16 15:42:50 +00:00
|
|
|
HOME=$PWD $tex test.tex
|
|
|
|
cp test.pdf $out
|
|
|
|
'');
|
|
|
|
in
|
|
|
|
builtins.listToAttrs (
|
2024-04-15 17:17:53 +00:00
|
|
|
lib.mapCartesianProduct texTest
|
|
|
|
{
|
2023-12-16 15:42:50 +00:00
|
|
|
tex = [ "xelatex" "lualatex" ];
|
|
|
|
fonttype = [ "ttf" "otf" ];
|
2024-01-08 11:17:42 +00:00
|
|
|
package = [ "junicode" ];
|
|
|
|
file = [ ./test.tex ];
|
2024-04-15 17:17:53 +00:00
|
|
|
}
|
2024-01-08 11:17:42 +00:00
|
|
|
++
|
|
|
|
[
|
|
|
|
(texTest {
|
|
|
|
package = "junicodevf";
|
|
|
|
fonttype = "ttf";
|
|
|
|
tex = "lualatex";
|
|
|
|
file = ./test-vf.tex;
|
|
|
|
})
|
|
|
|
]
|
2023-12-16 15:42:50 +00:00
|
|
|
)
|