From 6603342bb6204a2b147ffa7e18eaf4bd41fba882 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova Date: Sun, 4 Jul 2021 11:47:33 +0100 Subject: [PATCH] texlive.combine: generate language.dat.lua --- pkgs/tools/typesetting/tex/texlive/combine.nix | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ) '') +