Files
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

99 lines
2.0 KiB
Nix

{
stdenv,
lib,
makeWrapper,
fetchFromGitLab,
perl,
flex,
gnused,
coreutils,
which,
opensp,
groff,
texliveMedium,
texinfo,
withLatex ? false,
}:
stdenv.mkDerivation rec {
pname = "linuxdoc-tools";
version = "0.9.86";
src = fetchFromGitLab {
owner = "agmartin";
repo = "linuxdoc-tools";
rev = version;
hash = "sha256-AsTlrjTYuuLB2jF0zKPVrxOZ2ygUIyMJFV6qDd7ODwA=";
};
outputs = [
"out"
"man"
"doc"
];
configureFlags = [
("--enable-docs=txt info lyx html rtf" + lib.optionalString withLatex " pdf")
];
LEX = "flex";
postInstall = ''
wrapProgram $out/bin/linuxdoc \
--prefix PATH : "${
lib.makeBinPath [
groff
opensp
]
}:$out/bin" \
--prefix PERL5LIB : "$out/share/linuxdoc-tools/"
'';
doInstallCheck = true;
installCheckPhase = ''
pushd doc/example
substituteInPlace Makefile \
--replace "COMMAND=linuxdoc" "COMMAND=$out/bin/linuxdoc" \
${lib.optionalString (!withLatex) "--replace '.tex .dvi .ps .pdf' ''"}
make
popd
'';
nativeBuildInputs = [
flex
which
makeWrapper
];
buildInputs = [
opensp
groff
texinfo
perl
gnused
coreutils
]
++ lib.optionals withLatex [ texliveMedium ];
meta = with lib; {
description = "Toolset for processing LinuxDoc DTD SGML files";
longDescription = ''
A collection of text formatters which understands a LinuxDoc DTD SGML
source file. Each formatter (or "back-end") renders the source file into
a variety of output formats, including HTML, TeX, DVI, PostScript, plain
text, and groff source in manual-page format. The linuxdoc suite is
provided for backward compatibility, because there are still many useful
documents written in LinuxDoc DTD sgml source.
'';
homepage = "https://gitlab.com/agmartin/linuxdoc-tools";
license = with licenses; [
gpl3Plus
mit
sgmlug
];
platforms = platforms.linux;
maintainers = with maintainers; [ p-h ];
};
}