summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/tools/typesetting/tex/texlive-new/bin.nix25
-rw-r--r--pkgs/tools/typesetting/tex/texlive-new/default.nix4
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive-new/bin.nix b/pkgs/tools/typesetting/tex/texlive-new/bin.nix
index 677e64c57dc6..431f3926a13e 100644
--- a/pkgs/tools/typesetting/tex/texlive-new/bin.nix
+++ b/pkgs/tools/typesetting/tex/texlive-new/bin.nix
@@ -8,6 +8,8 @@
 , makeWrapper
 }:
 
+# Useful resource covering build options:
+# http://tug.org/texlive/doc/tlbuild.html
 
 let
   withSystemLibs = map (libname: "--with-system-${libname}");
@@ -221,5 +223,28 @@ bibtex8 = stdenv.mkDerivation {
 };
 
 
+xdvi = stdenv.mkDerivation {
+  name = "texlive-xdvi.bin-${version}";
+
+  inherit (common) src;
+
+  buildInputs = [ pkgconfig core/*kpathsea*/ freetype ghostscript ]
+    ++ (with xorg; [ libX11 libXaw libXi libXpm libXmu libXaw libXext libXfixes ]);
+
+  preConfigure = "cd texk/xdvik";
+
+  configureFlags = common.configureFlags
+    ++ [ "--with-system-kpathsea" "--with-system-libgs" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    substituteInPlace "$out/bin/xdvi" \
+      --replace "exec xdvi-xaw" "exec '$out/bin/xdvi-xaw'"
+  '';
+  # TODO: it's suspicious that mktexpk generates fonts into ~/.texlive2014
+};
+
+
 } # un-indented
 
diff --git a/pkgs/tools/typesetting/tex/texlive-new/default.nix b/pkgs/tools/typesetting/tex/texlive-new/default.nix
index a084c973b780..5fe52ba07baf 100644
--- a/pkgs/tools/typesetting/tex/texlive-new/default.nix
+++ b/pkgs/tools/typesetting/tex/texlive-new/default.nix
@@ -84,6 +84,10 @@ let
       latex = orig.latex // {
         deps = removeAttrs orig.latex.deps [ "luatex" ];
       };
+
+      xdvi = orig.xdvi // { # it seems to need it to transform fonts
+        deps = (orig.xdvi.deps or {}) // { inherit (tl) metafont; };
+      };
     }; # overrides
 
     # tl =