diff options
author | Raymond Gauthier <jraygauthier@gmail.com> | 2016-05-09 19:20:23 -0400 |
---|---|---|
committer | Raymond Gauthier <jraygauthier@gmail.com> | 2016-05-09 19:29:05 -0400 |
commit | 8a4b670a2f2e262a35288d49254236e934b08ab5 (patch) | |
tree | 8fd7e20b6f6fce68bf1b1a5f2ef0bab0f1092e74 /pkgs/tools/typesetting | |
parent | b10659196b14358858c786749824956fac3a889d (diff) | |
download | nixlib-8a4b670a2f2e262a35288d49254236e934b08ab5.tar nixlib-8a4b670a2f2e262a35288d49254236e934b08ab5.tar.gz nixlib-8a4b670a2f2e262a35288d49254236e934b08ab5.tar.bz2 nixlib-8a4b670a2f2e262a35288d49254236e934b08ab5.tar.lz nixlib-8a4b670a2f2e262a35288d49254236e934b08ab5.tar.xz nixlib-8a4b670a2f2e262a35288d49254236e934b08ab5.tar.zst nixlib-8a4b670a2f2e262a35288d49254236e934b08ab5.zip |
texlive.combine: fix build
Recent merge of pull request #14681 broke the build of some texlive components (e.g.: `xetex`) that do not include the `./share/texmf/web2c/texmf.cnf`. This fix should allow these component to build as before by operating on this file only when it exits.
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive-new/combine.nix | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive-new/combine.nix b/pkgs/tools/typesetting/tex/texlive-new/combine.nix index 2818cbc03849..87b2d93b59b6 100644 --- a/pkgs/tools/typesetting/tex/texlive-new/combine.nix +++ b/pkgs/tools/typesetting/tex/texlive-new/combine.nix @@ -66,6 +66,25 @@ in buildEnv { # TODO: perhaps do lua actions? # tried inspiration from install-tl, sub do_texmf_cnf '' + patchCnfLua() { + local cnfLua="$1" + + if [ -e "$cnfLua" ]; then + local cnfLuaOrig="$(realpath "$cnfLua")" + rm ./texmfcnf.lua + sed \ + -e 's,texmf-dist,texmf,g' \ + -e 's,texmf-local,texmf,g' \ + -e "s,\(TEXMFLOCAL[ ]*=[ ]*\)[^\,]*,\1\"$out/share/texmf\",g" \ + -e "s,\$SELFAUTOLOC,$out,g" \ + -e "s,selfautodir:/,$out/share/,g" \ + -e "s,selfautodir:,$out/share/,g" \ + -e "s,selfautoparent:/,$out/share/,g" \ + -e "s,selfautoparent:,$out/share/,g" \ + "$cnfLuaOrig" > "$cnfLua" + fi + } + ( cd ./share/texmf/web2c/ local cnfOrig="$(realpath ./texmf.cnf)" @@ -79,18 +98,7 @@ in buildEnv { -e "s,\$SELFAUTOGRANDPARENT,$out/share,g" \ "$cnfOrig" > ./texmf.cnf - local cnfLuaOrig="$(realpath ./texmfcnf.lua)" - rm ./texmfcnf.lua - sed \ - -e 's,texmf-dist,texmf,g' \ - -e 's,texmf-local,texmf,g' \ - -e "s,\(TEXMFLOCAL[ ]*=[ ]*\)[^\,]*,\1\"$out/share/texmf\",g" \ - -e "s,\$SELFAUTOLOC,$out,g" \ - -e "s,selfautodir:/,$out/share/,g" \ - -e "s,selfautodir:,$out/share/,g" \ - -e "s,selfautoparent:/,$out/share/,g" \ - -e "s,selfautoparent:,$out/share/,g" \ - "$cnfLuaOrig" > ./texmfcnf.lua + patchCnfLua "./texmfcnf.lua" rm updmap.cfg ) |