···152152 | tee "$out/scheme-infraonly/$fname.patch"
153153 done
154154 '';
155155+156156+ # test that fmtutil.cnf is fully regenerated on scheme-full
157157+ fmtutilCnf = runCommandNoCC "texlive-test-fmtutil.cnf" {
158158+ kpathsea = lib.head texlive.kpathsea.pkgs;
159159+ schemeFull = texlive.combined.scheme-full;
160160+ } ''
161161+ mkdir -p "$out"
162162+163163+ diff --ignore-matching-lines='^# Generated by ' -u \
164164+ {"$kpathsea","$schemeFull"/share/texmf}/web2c/fmtutil.cnf \
165165+ | tee "$out/fmtutil.cnf.patch"
166166+ '';
155167}
+17-5
pkgs/tools/typesetting/tex/texlive/combine.nix
···121121 mkdir $out/share/texmf-local
122122 )
123123 '' +
124124- # now filter hyphenation patterns, in a hacky way ATM
124124+ # now filter hyphenation patterns and formats
125125 (let
126126 hyphens = lib.filter (p: p.hasHyphens or false && p.tlType == "run") pkgList.splitBin.wrong;
127127- pnames = uniqueStrings (map (p: p.pname) hyphens);
127127+ hyphenPNames = uniqueStrings (map (p: p.pname) hyphens);
128128+ formats = lib.filter (p: p.hasFormats or false && p.tlType == "run") pkgList.splitBin.wrong;
129129+ formatPNames = uniqueStrings (map (p: p.pname) formats);
128130 # sed expression that prints the lines in /start/,/end/ except for /end/
129131 section = start: end: "/${start}/,/${end}/{ /${start}/p; /${end}/!p; };\n";
130132 script =
···134136 # pick up the header
135137 + "2,/^% from/{ /^% from/!p; };\n"
136138 # pick up all sections matching packages that we combine
137137- + lib.concatMapStrings (pname: section "^% from ${pname}:$" "^% from|^%%% No changes may be made beyond this point.$") pnames
139139+ + lib.concatMapStrings (pname: section "^% from ${pname}:$" "^% from|^%%% No changes may be made beyond this point.$") hyphenPNames
138140 # pick up the footer (for language.def)
139141 + "/^%%% No changes may be made beyond this point.$/,$p;\n"
140142 );
···142144 writeText "hyphens.lua.sed" (
143145 "1{ s/^(-- Generated by .*)$/\\1, modified by texlive.combine/; p; }\n"
144146 + "2,/^-- END of language.us.lua/p;\n"
145145- + lib.concatMapStrings (pname: section "^-- from ${pname}:$" "^}$|^-- from") pnames
147147+ + lib.concatMapStrings (pname: section "^-- from ${pname}:$" "^}$|^-- from") hyphenPNames
146148 + "$p;\n"
147149 );
150150+ fmtutilSed =
151151+ writeText "fmtutil.sed" (
152152+ "1{ s/^(# Generated by .*)$/\\1, modified by texlive.combine/; p; }\n"
153153+ + "2,/^# from/{ /^# from/!p; };\n"
154154+ + lib.concatMapStrings (pname: section "^# from ${pname}:$" "^# from") formatPNames
155155+ );
148156 in ''
149157 (
150158 cd ./share/texmf/tex/generic/config/
···152160 [[ -e "$fname" ]] && sed -E -n -f '${script}' -i "$fname"
153161 done
154162 [[ -e language.dat.lua ]] && sed -E -n -f '${scriptLua}' -i language.dat.lua
163163+ )
164164+ (
165165+ cd ./share/texmf/web2c/
166166+ [[ -e fmtutil.cnf ]] && sed -E -n -f '${fmtutilSed}' -i fmtutil.cnf
155167 )
156168 '') +
157169···213225214226 perl `type -P mktexlsr.pl` ./share/texmf
215227 ${bin.texlinks} "$out/bin" && wrapBin
216216- (perl `type -P fmtutil.pl` --sys --all || true) | grep '^fmtutil' # too verbose
228228+ perl `type -P fmtutil.pl` --sys --all | grep '^fmtutil' # too verbose
217229 #${bin.texlinks} "$out/bin" && wrapBin # do we need to regenerate format links?
218230219231 # Disable unavailable map files
+3-1
pkgs/tools/typesetting/tex/texlive/default.nix
···109109 pkgs =
110110 # tarball of a collection/scheme itself only contains a tlobj file
111111 [( if (attrs.hasRunfiles or false) then mkPkgV "run"
112112- # the fake derivations are used for filtering of hyphenation patterns
112112+ # the fake derivations are used for filtering of hyphenation patterns and formats
113113 else {
114114 inherit pname version;
115115 tlType = "run";
116116+ hasFormats = attrs.hasFormats or false;
116117 hasHyphens = attrs.hasHyphens or false;
117118 }
118119 )]
···171172 # metadata for texlive.combine
172173 passthru = {
173174 inherit pname tlType version;
175175+ hasFormats = args.hasFormats or false;
174176 hasHyphens = args.hasHyphens or false;
175177 };
176178 } // lib.optionalAttrs (fixedHash != null) {