diff options
author | Philippe Hürlimann <p@hurlimann.org> | 2022-12-26 18:49:44 +0100 |
---|---|---|
committer | Philippe Hürlimann <p@hurlimann.org> | 2022-12-28 00:17:27 +0100 |
commit | c3161d81bd54122c26021a26e3e571de86d593ce (patch) | |
tree | 152717a3ffa9d1669bbf97ea354074d3f0161c5d /pkgs/tools/text/sgml | |
parent | a2c1f5558651a6f9243714e9d0a47fa83ad41200 (diff) |
linuxdoc-tools: init at 0.9.82
Heavily based on original work by xvuko Co-authored-by: xvuko <nix@vuko.pl>
Diffstat (limited to 'pkgs/tools/text/sgml')
-rw-r--r-- | pkgs/tools/text/sgml/linuxdoc-tools/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/tools/text/sgml/linuxdoc-tools/default.nix b/pkgs/tools/text/sgml/linuxdoc-tools/default.nix new file mode 100644 index 0000000000000..8050d084e3507 --- /dev/null +++ b/pkgs/tools/text/sgml/linuxdoc-tools/default.nix @@ -0,0 +1,62 @@ +{ stdenv, lib, makeWrapper, fetchFromGitLab, openjade, gnumake, perl, flex +, gnused, coreutils, which, opensp, groff, texlive, texinfo, withLatex ? false +}: + +stdenv.mkDerivation rec { + pname = "linuxdoc-tools"; + version = "0.9.82"; + + src = fetchFromGitLab { + owner = "agmartin"; + repo = "linuxdoc-tools"; + rev = version; + sha256 = "17v9ilh79av4n94vk4m52aq57ykb9myffxd2qr8kb8b3xnq5d36z"; + }; + + 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 [ texlive.combined.scheme-medium ]; + + 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 ]; + }; +} |