From ca5424b750912c89afdd53869504c12e90a38a0d Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 28 Nov 2020 13:17:48 -0500 Subject: [PATCH 1/2] perlPackages.LaTeXML: patch shebangs to use full path to perl on darwin --- pkgs/top-level/perl-packages.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index f7878f1910e0..8e20d0223723 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -10710,14 +10710,16 @@ let url = "mirror://cpan/authors/id/B/BR/BRMILLER/LaTeXML-0.8.4.tar.gz"; sha256 = "92599b45fb587ac14b2ba9cc84b85d9ddc2deaf1cbdc2e89e7a6559e1fbb34cc"; }; - propagatedBuildInputs = [ shortenPerlShebang ArchiveZip DBFile FileWhich IOString ImageSize JSONXS LWP ParseRecDescent PodParser TextUnidecode XMLLibXSLT ]; + propagatedBuildInputs = [ 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 + 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"; From 1211f2b78ef7b018116585116545bad006289b2d Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova Date: Sun, 27 Sep 2020 17:35:25 +0100 Subject: [PATCH 2/2] perlPackages.LaTeXML: reenable tests except for epub Co-authored-by: Stig P --- pkgs/top-level/perl-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 8e20d0223723..21e5c64b4bb5 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -10711,7 +10711,9 @@ let sha256 = "92599b45fb587ac14b2ba9cc84b85d9ddc2deaf1cbdc2e89e7a6559e1fbb34cc"; }; propagatedBuildInputs = [ ArchiveZip DBFile FileWhich IOString ImageSize JSONXS LWP ParseRecDescent PodParser TextUnidecode XMLLibXSLT ]; - doCheck = false; # epub test fails + 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 = ''