From 003af12c96f3b8bb943bc8e257c419833f408912 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova Date: Sun, 21 Mar 2021 21:28:41 +0000 Subject: [PATCH] perlPackages.LaTeXML: enable ImageMagick --- pkgs/top-level/perl-packages.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 557484e96ff..948a70adad9 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -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;