Merge pull request #117161 from xworld21/latexml-perlmagick

perlPackages.LaTeXML: enable ImageMagick
This commit is contained in:
stigtsp 2021-03-23 11:34:24 +01:00 committed by GitHub
commit 7949331040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10955,11 +10955,12 @@ let
url = "mirror://cpan/authors/id/B/BR/BRMILLER/${pname}-${version}.tar.gz";
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 = ''
rm t/931_epub.t # epub test fails
'';
nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
buildInputs = [ pkgs.makeWrapper ];
# shebangs need to be patched before executables are copied to $out
preBuild = ''
patchShebangs bin/
@ -10968,6 +10969,12 @@ let
shortenPerlShebang "$file"
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 = {
description = "Transforms TeX and LaTeX into XML/HTML/MathML";
license = lib.licenses.free;