diff options
Diffstat (limited to 'pkgs/tools/typesetting/tex/texlive-new/bin.nix')
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive-new/bin.nix | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive-new/bin.nix b/pkgs/tools/typesetting/tex/texlive-new/bin.nix index 83dcd4b72cd..b99edc2d062 100644 --- a/pkgs/tools/typesetting/tex/texlive-new/bin.nix +++ b/pkgs/tools/typesetting/tex/texlive-new/bin.nix @@ -1,10 +1,10 @@ { stdenv, lib, fetchurl -, config +, texlive , zlib, bzip2, ncurses, libpng, flex, bison, libX11, libICE, xproto , freetype, t1lib, gd, libXaw, icu, ghostscript, ed, libXt, libXpm, libXmu, libXext , xextproto, perl, libSM, ruby, expat, curl, libjpeg, python, fontconfig, pkgconfig , poppler, libpaper, graphite2, lesstif, zziplib, harfbuzz, texinfo, potrace, gmp, mpfr -, xpdf, cairo, pixman, xorg +, xpdf, cairo, pixman, xorg, clisp , makeWrapper }: @@ -66,6 +66,12 @@ core = stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; + postPatch = '' + for i in texk/kpathsea/mktex*; do + sed -i '/^mydir=/d' "$i" + done + ''; + preConfigure = '' rm -r libs/{cairo,freetype2,gd,gmp,graphite2,harfbuzz,icu,libpaper,libpng} \ libs/{mpfr,pixman,poppler,potrace,xpdf,zlib,zziplib} @@ -251,5 +257,35 @@ xdvi = stdenv.mkDerivation { }; +xindy = stdenv.mkDerivation { + name = "texlive-xindy.bin-${version}"; + + inherit (common) src; + prePatch = "cd utils/xindy"; + # hardcode clisp location + postPatch = '' + substituteInPlace xindy-?.?.?/user-commands/xindy.in \ + --replace "our \$clisp = ( \$is_windows ? 'clisp.exe' : 'clisp' ) ;" \ + "our \$clisp = '$(type -P clisp)';" + ''; + + nativeBuildInputs = [ + pkgconfig perl + (texlive.combine { inherit (texlive) scheme-basic cyrillic ec; }) + ]; + buildInputs = [ clisp ]; + + configureFlags = [ "--with-clisp-runtime=system" "--disable-xindy-docs" ]; + + preInstall = ''mkdir -p "$out/bin" ''; + # fixup various file-location errors of: lib/xindy/{xindy.mem,modules/} + postInstall = '' + mkdir -p "$out/lib/xindy" + mv "$out"/{bin/xindy.mem,lib/xindy/} + ln -s ../../share/texmf-dist/xindy/modules "$out/lib/xindy/" + ''; +}; + + } # un-indented |