perlPackages.LaTeXML: enable ImageMagick

This commit is contained in:
Vincenzo Mantova 2021-03-21 21:28:41 +00:00
parent 6f4c2affc5
commit 003af12c96
1 changed files with 8 additions and 1 deletions

View File

@ -10955,11 +10955,12 @@ let
url = "mirror://cpan/authors/id/B/BR/BRMILLER/${pname}-${version}.tar.gz"; url = "mirror://cpan/authors/id/B/BR/BRMILLER/${pname}-${version}.tar.gz";
sha256 = "0dr69rgl4si9i9ww1r4dc7apgb7y6f7ih808w4g0924cvz823s0x"; sha256 = "0dr69rgl4si9i9ww1r4dc7apgb7y6f7ih808w4g0924cvz823s0x";
}; };
propagatedBuildInputs = [ ArchiveZip DBFile FileWhich IOString ImageSize JSONXS LWP ParseRecDescent PodParser TextUnidecode XMLLibXSLT ]; propagatedBuildInputs = [ ArchiveZip DBFile FileWhich IOString ImageSize JSONXS LWP ParseRecDescent PerlMagick PodParser TextUnidecode XMLLibXSLT ];
preCheck = '' preCheck = ''
rm t/931_epub.t # epub test fails rm t/931_epub.t # epub test fails
''; '';
nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
buildInputs = [ pkgs.makeWrapper ];
# shebangs need to be patched before executables are copied to $out # shebangs need to be patched before executables are copied to $out
preBuild = '' preBuild = ''
patchShebangs bin/ patchShebangs bin/
@ -10968,6 +10969,12 @@ let
shortenPerlShebang "$file" shortenPerlShebang "$file"
done done
''; '';
postInstall = ''
for file in latexmlc latexmlmath latexmlpost ; do
# add runtime dependencies that cause silent failures when missing
wrapProgram $out/bin/$file --prefix PATH : ${lib.makeBinPath [ pkgs.ghostscript pkgs.potrace ]}
done
'';
meta = { meta = {
description = "Transforms TeX and LaTeX into XML/HTML/MathML"; description = "Transforms TeX and LaTeX into XML/HTML/MathML";
license = lib.licenses.free; license = lib.licenses.free;