2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper
|
2017-01-11 11:36:19 +01:00
|
|
|
, ghostscript, netpbm, perl }:
|
|
|
|
# TODO: withTex
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "latex2html";
|
2021-01-19 19:02:08 +01:00
|
|
|
version = "2021";
|
2017-01-11 11:36:19 +01:00
|
|
|
|
2019-09-01 04:17:53 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-01-19 19:02:08 +01:00
|
|
|
sha256 = "sha256-n7VbK/S9EkWxb4fbIXp3tIfX7N+9bvZ/odBylqTuzUU=";
|
2017-01-11 11:36:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ghostscript netpbm perl ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
./configure \
|
|
|
|
--prefix="$out" \
|
|
|
|
--without-mktexlsr \
|
|
|
|
--with-texpath=$out/share/texmf/tex/latex/html
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for p in $out/bin/{latex2html,pstoimg}; do \
|
|
|
|
wrapProgram $p --add-flags '--tmp="''${TMPDIR:-/tmp}"'
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-01-11 11:36:19 +01:00
|
|
|
description = "LaTeX-to-HTML translator";
|
|
|
|
longDescription = ''
|
|
|
|
A Perl program that translates LaTeX into HTML (HyperText Markup
|
|
|
|
Language), optionally creating separate HTML files corresponding to each
|
|
|
|
unit (e.g., section) of the document. LaTeX2HTML proceeds by interpreting
|
|
|
|
LaTeX (to the best of its abilities). It contains definitions from a wide
|
|
|
|
variety of classes and packages, and users may add further definitions by
|
|
|
|
writing Perl scripts that provide information about class/package
|
|
|
|
commands.
|
|
|
|
'';
|
|
|
|
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.ctan.org/pkg/latex2html";
|
2017-01-11 11:36:19 +01:00
|
|
|
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
maintainers = with maintainers; [ yurrriq ];
|
|
|
|
};
|
|
|
|
}
|