Merge pull request #105271 from veprbl/pr/LaTeXML_darwin_fix

perlPackages.LaTeXML: patch shebangs to use full path to perl on darwin
This commit is contained in:
StigP 2020-11-28 23:02:14 +01:00 committed by GitHub
commit aed3b7cf54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10710,14 +10710,18 @@ let
url = "mirror://cpan/authors/id/B/BR/BRMILLER/${pname}-${version}.tar.gz";
sha256 = "0dr69rgl4si9i9ww1r4dc7apgb7y6f7ih808w4g0924cvz823s0x";
};
propagatedBuildInputs = [ shortenPerlShebang ArchiveZip DBFile FileWhich IOString ImageSize JSONXS LWP ParseRecDescent PodParser TextUnidecode XMLLibXSLT ];
doCheck = false; # epub test fails
postInstall = ''
shortenPerlShebang $out/bin/latexml
shortenPerlShebang $out/bin/latexmlc
shortenPerlShebang $out/bin/latexmlfind
shortenPerlShebang $out/bin/latexmlmath
shortenPerlShebang $out/bin/latexmlpost
propagatedBuildInputs = [ ArchiveZip DBFile FileWhich IOString ImageSize JSONXS LWP ParseRecDescent PodParser TextUnidecode XMLLibXSLT ];
preCheck = ''
rm t/931_epub.t # epub test fails
'';
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
# shebangs need to be patched before executables are copied to $out
preBuild = ''
patchShebangs bin/
'' + stdenv.lib.optionalString stdenv.isDarwin ''
for file in bin/*; do
shortenPerlShebang "$file"
done
'';
meta = {
description = "Transforms TeX and LaTeX into XML/HTML/MathML";