summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2019-05-02 12:44:07 -0400
committerGitHub <noreply@github.com>2019-05-02 12:44:07 -0400
commit7eeab3726f0cd6ceeabfae60db284b7d84fae5d3 (patch)
tree8b2f316015c15182045b306933f39d5bb4fb5a84 /pkgs/tools/typesetting
parenta64cd8ededeff8899e3efdbc2181695e080d296c (diff)
parentdbc2c1c4b8e4d82a3c8ef3ef5fe76d84ac07766d (diff)
Merge pull request #59537 from veprbl/pr/texlive_latexindent_deps
texlive: add missing perl dependencies for latexindent
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/tex/texlive/bin.nix28
1 files changed, 27 insertions, 1 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix
index 18fb45dbfe67..10b4198bd64c 100644
--- a/pkgs/tools/typesetting/tex/texlive/bin.nix
+++ b/pkgs/tools/typesetting/tex/texlive/bin.nix
@@ -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
@@ -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}/
+ '';
+};
+
}