texlive: add xindy binary

Fixes #16207.
This commit is contained in:
Vladimír Čunát 2016-06-13 15:37:25 +02:00
parent 3ea8068181
commit 7a6ec0a0ee

View File

@ -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
}:
@ -247,5 +247,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