texlive: fix too-long shebang line on Darwin for latexinent

This commit is contained in:
Dmitry Kalinkin 2019-08-19 18:56:36 -04:00
parent 8036b0f015
commit 430f0e14d3
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333

View file

@ -5,7 +5,7 @@
, perl, perlPackages, pkgconfig, autoreconfHook
, poppler, libpaper, graphite2, zziplib, harfbuzz, potrace, gmp, mpfr
, cairo, pixman, xorg, clisp, biber
, makeWrapper
, makeWrapper, shortenPerlShebang
}:
# Useful resource covering build options:
@ -292,6 +292,7 @@ latexindent = perlPackages.buildPerlPackage rec {
outputs = [ "out" ];
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
propagatedBuildInputs = with perlPackages; [ FileHomeDir LogDispatch LogLog4perl UnicodeLineBreak YAMLTiny ];
postPatch = ''
@ -308,6 +309,8 @@ latexindent = perlPackages.buildPerlPackage rec {
install -D ./scripts/latexindent/latexindent.pl "$out"/bin/latexindent
mkdir -p "$out"/${perl.libPrefix}
cp -r ./scripts/latexindent/LatexIndent "$out"/${perl.libPrefix}/
'' + stdenv.lib.optionalString stdenv.isDarwin ''
shortenPerlShebang "$out"/bin/latexindent
'';
};