Files
nixpkgs/pkgs/by-name/la/latex2html/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

67 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
ghostscript,
netpbm,
perl,
}:
# TODO: withTex
stdenv.mkDerivation rec {
pname = "latex2html";
version = "2025";
src = fetchFromGitHub {
owner = "latex2html";
repo = "latex2html";
rev = "v${version}";
sha256 = "sha256-xylIU2GY/1t9mA8zJzEjHwAIlvVxZmUAUdQ/IXEy+Wg=";
};
buildInputs = [
ghostscript
netpbm
perl
];
nativeBuildInputs = [ makeWrapper ];
configurePhase = ''
runHook preConfigure
./configure \
--prefix="$out" \
--without-mktexlsr \
--with-texpath=$out/share/texmf/tex/latex/html
runHook postConfigure
'';
postInstall = ''
for p in $out/bin/{latex2html,pstoimg}; do \
wrapProgram $p --add-flags '--tmp="''${TMPDIR:-/tmp}"'
done
'';
meta = with lib; {
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.
'';
homepage = "https://www.ctan.org/pkg/latex2html";
license = licenses.gpl2Only;
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ yurrriq ];
};
}