texlivePackages.l3build: inject path to system texmf.cnf (#521018)
This commit is contained in:
@@ -402,6 +402,29 @@ rec {
|
||||
done
|
||||
'';
|
||||
|
||||
# verify that l3build works correctly
|
||||
l3build =
|
||||
runCommand "texlive-test-l3build"
|
||||
{
|
||||
nativeBuildInputs = [ (texliveSmall.withPackages (ps: [ ps.l3build ])) ];
|
||||
}
|
||||
''
|
||||
cat >>build.lua <<EOF
|
||||
module = "texlive-test-l3build"
|
||||
typesetfiles = {"*.tex"}
|
||||
EOF
|
||||
|
||||
cat >>test-l3build.tex <<EOF
|
||||
\documentclass{article}
|
||||
\begin{document}
|
||||
l3build ran successfully.
|
||||
\end{document}
|
||||
EOF
|
||||
|
||||
l3build doc
|
||||
l3build install --full --texmfhome "$out"
|
||||
'';
|
||||
|
||||
# verify that the restricted mode gets enabled when
|
||||
# needed (detected by checking if it disallows --gscmd)
|
||||
repstopdf =
|
||||
|
||||
@@ -9749,7 +9749,7 @@
|
||||
source = "12np4gmh0y5cg66ijb96kfbdq49d38rg485nql5q0n6pgn42apnc";
|
||||
};
|
||||
l3build-77170 = {
|
||||
run = "0f3qfgm4whm1p8alx8gwca2glgx86c48w04d62zkpzgpadkyhzbq";
|
||||
run = "18104w97ad97ki02yghqclcdv0v916h8lyp676cyg3wc7hjvs5cq";
|
||||
doc = "0i45c0bni3xx38wgcp30gh2dg0ak2snsfjrx86kwfyvmgjsm9ric";
|
||||
source = "1n2g8vcfnya74dsm8plaj0vbfwgs8a4lqpxqvxa9vgdda288534p";
|
||||
};
|
||||
|
||||
@@ -460,6 +460,15 @@ lib.recursiveUpdate orig rec {
|
||||
substituteInPlace "$out"/bin/latexindent --replace-fail 'use FindBin;' "BEGIN { \$0 = '$scriptsFolder' . '/latexindent.pl'; }; use FindBin;"
|
||||
'';
|
||||
|
||||
# l3build ignores the TEXMFCNF variable to prevent user customisations from affecting the build
|
||||
# but we rely on TEXMFCNF to find the system texmf.cnf, so we must inject its path into l3build
|
||||
# WARNING: this relies on the system texmf.cnf being in $TEXMFSYSVAR/web2c
|
||||
l3build.postUnpack = ''
|
||||
if [[ -f "$out"/scripts/l3build/l3build-aux.lua ]] ; then
|
||||
substituteInPlace "$out"/scripts/l3build/l3build-aux.lua --replace-fail '" TEXMFCNF=."' '" TEXMFCNF=." .. os_pathsep .. kpse.var_value("TEXMFSYSVAR") .. "/web2c"'
|
||||
fi
|
||||
'';
|
||||
|
||||
# find files in script directory, not in binary directory
|
||||
minted.postFixup = ''
|
||||
substituteInPlace "$out"/bin/latexminted --replace-fail "__file__" "\"$scriptsFolder/latexminted.py\""
|
||||
|
||||
Reference in New Issue
Block a user