summary refs log tree commit diff
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-03-28 08:51:39 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-03-28 08:51:39 +0200
commiteb4a9d4d9ca526f8d4c4fab64545b147ce1da31b (patch)
tree9cfe77d348c56ee9aa43cbe05c3c6652f1c5cf39 /pkgs/tools/typesetting
parent4989fd85d480526d5dc607944bd1b5684ec96020 (diff)
downloadnixpkgs-eb4a9d4d9ca526f8d4c4fab64545b147ce1da31b.tar
nixpkgs-eb4a9d4d9ca526f8d4c4fab64545b147ce1da31b.tar.gz
nixpkgs-eb4a9d4d9ca526f8d4c4fab64545b147ce1da31b.tar.bz2
nixpkgs-eb4a9d4d9ca526f8d4c4fab64545b147ce1da31b.tar.lz
nixpkgs-eb4a9d4d9ca526f8d4c4fab64545b147ce1da31b.tar.xz
nixpkgs-eb4a9d4d9ca526f8d4c4fab64545b147ce1da31b.tar.zst
nixpkgs-eb4a9d4d9ca526f8d4c4fab64545b147ce1da31b.zip
Revert "texlive.combine: patch paths into texmf.cnf"
This reverts commit acf664814e37c54a7c12b1d065354cab15382793.
Let's revert until we catch the bugs in this.
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/tex/texlive-new/combine.nix21
1 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive-new/combine.nix b/pkgs/tools/typesetting/tex/texlive-new/combine.nix
index 0619a3cc26c..e69c6ec425c 100644
--- a/pkgs/tools/typesetting/tex/texlive-new/combine.nix
+++ b/pkgs/tools/typesetting/tex/texlive-new/combine.nix
@@ -60,24 +60,21 @@ in buildEnv {
     +
   ''
     export PATH="$out/bin:$out/share/texmf/scripts/texlive:${perl}/bin:$PATH"
+    export TEXMFCNF="$out/share/texmf/web2c"
+    export TEXMFDIST="$out/share/texmf"
+    export TEXMFSYSCONFIG="$out/share/texmf-config"
+    export TEXMFSYSVAR="$out/share/texmf-var"
     export PERL5LIB="$out/share/texmf/scripts/texlive"
   '' +
-    # patch texmf-{dist,local} -> texmf to be sure
-    # TODO: perhaps do lua actions?
+    # patch texmf-dist -> texmf to be sure
+    # TODO: cleanup the search paths incl. SELFAUTOLOC, and perhaps do lua actions?
     # tried inspiration from install-tl, sub do_texmf_cnf
   ''
     (
       cd ./share/texmf/web2c/
       local cnfOrig="$(realpath ./texmf.cnf)"
       rm ./texmf.cnf
-      sed \
-        -e 's,texmf-dist,texmf,g' \
-        -e 's,texmf-local,texmf,g' \
-        -e "s,\$SELFAUTOLOC,$out,g" \
-        -e "s,\$SELFAUTODIR,$out/share,g" \
-        -e "s,\$SELFAUTOPARENT,$out/share,g" \
-        -e "s,\$SELFAUTOGRANDPARENT,$out/share,g" \
-        "$cnfOrig" > ./texmf.cnf
+      cat "$cnfOrig" | sed 's/texmf-dist/texmf/g' > ./texmf.cnf
 
       rm updmap.cfg
     )
@@ -115,6 +112,10 @@ in buildEnv {
       rm "$link"
       makeWrapper "$target" "$link" \
         --prefix PATH : "$out/bin:${perl}/bin" \
+        --set TEXMFCNF "$out/share/texmf/web2c" \
+        --set TEXMFDIST "$out/share/texmf" \
+        --set TEXMFSYSCONFIG "$out/share/texmf-config" \
+        --set TEXMFSYSVAR "$out/share/texmf-var" \
         --prefix PERL5LIB : "$out/share/texmf/scripts/texlive"
 
       # avoid using non-nix shebang in $target by calling interpreter