diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix index a4b78a481035..17e46d3f93f9 100644 --- a/pkgs/tools/typesetting/tex/texlive/combine.nix +++ b/pkgs/tools/typesetting/tex/texlive/combine.nix @@ -137,12 +137,20 @@ in (buildEnv { # pick up the footer (for language.def) + "/^%%% No changes may be made beyond this point.$/,$p;\n" ); + scriptLua = + writeText "hyphens.lua.sed" ( + "1{ s/^(-- Generated by .*)$/\\1, modified by texlive.combine/; p; }\n" + + "2,/^-- END of language.us.lua/p;\n" + + lib.concatMapStrings (pname: section "^-- from ${pname}:$" "^}$|^-- from") pnames + + "$p;\n" + ); in '' ( cd ./share/texmf/tex/generic/config/ for fname in language.{dat,def}; do [[ -e "$fname" ]] && sed -E -n -f '${script}' -i "$fname" done + [[ -e language.dat.lua ]] && sed -E -n -f '${scriptLua}' -i language.dat.lua ) '') +