Skip to content

Commit

Permalink
Merge pull request #59537 from veprbl/pr/texlive_latexindent_deps
Browse files Browse the repository at this point in the history
texlive: add missing perl dependencies for latexindent
  • Loading branch information
veprbl committed May 2, 2019
2 parents a64cd8e + dbc2c1c commit 7eeab37
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion pkgs/tools/typesetting/tex/texlive/bin.nix
Expand Up @@ -2,7 +2,7 @@
, texlive
, zlib, libiconv, libpng, libX11
, freetype, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext
, perl, pkgconfig, autoreconfHook
, perl, perlPackages, pkgconfig, autoreconfHook
, poppler, libpaper, graphite2, zziplib, harfbuzz, potrace, gmp, mpfr
, cairo, pixman, xorg, clisp, biber
, makeWrapper
Expand Down Expand Up @@ -364,4 +364,30 @@ xindy = stdenv.mkDerivation {
'';
};

latexindent = perlPackages.buildPerlPackage rec {
inherit (src) name version;

src = stdenv.lib.head (builtins.filter (p: p.tlType == "run") texlive.latexindent.pkgs);

outputs = [ "out" ];

propagatedBuildInputs = with perlPackages; [ FileHomeDir LogDispatch LogLog4perl UnicodeLineBreak YAMLTiny ];

postPatch = ''
substituteInPlace scripts/latexindent/LatexIndent/GetYamlSettings.pm \
--replace '$FindBin::RealBin/defaultSettings.yaml' ${src}/scripts/latexindent/defaultSettings.yaml
'';

# Dirty hack to apply perlFlags, but do no build
preConfigure = ''
touch Makefile.PL
'';
buildPhase = ":";
installPhase = ''
install -D ./scripts/latexindent/latexindent.pl "$out"/bin/latexindent
mkdir -p "$out"/${perl.libPrefix}
cp -r ./scripts/latexindent/LatexIndent "$out"/${perl.libPrefix}/
'';
};

}

0 comments on commit 7eeab37

Please sign in to comment.