1 { fetchurl, lib, stdenv, texinfo, perlPackages
2 , groff, libxml2, libxslt, gnused, libiconv, opensp
3 , docbook_xml_dtd_43, bash
6 stdenv.mkDerivation rec {
11 url = "mirror://sourceforge/docbook2x/docbook2X-${version}.tar.gz";
12 sha256 = "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0";
15 # This patch makes sure that `docbook2texi --to-stdout' actually
16 # writes its output to stdout instead of creating a file.
17 patches = [ ./db2x_texixml-to-stdout.patch ];
19 nativeBuildInputs = [ makeWrapper perlPackages.perl texinfo libxslt ];
20 buildInputs = [ groff libxml2 opensp libiconv bash ]
21 ++ (with perlPackages; [ perl XMLSAX XMLParser XMLNamespaceSupport ]);
24 # Broken substitution is used for `perl/config.pl', which leaves literal
26 substituteInPlace "perl/config.pl" \
27 --replace '${"\$" + "{prefix}"}' "$out"
30 doCheck = false; # fails a lot of tests
33 perlPrograms="db2x_manxml db2x_texixml db2x_xsltproc
34 docbook2man docbook2texi";
35 for i in $perlPrograms
37 # XXX: We work around the fact that `wrapProgram' doesn't support
38 # spaces below by inserting escaped backslashes.
39 wrapProgram $out/bin/$i \
40 --prefix PERL5LIB : ${with perlPackages; makeFullPerlPath [XMLSAX XMLParser XMLNamespaceSupport]} \
41 --prefix XML_CATALOG_FILES "\ " \
42 "$out/share/docbook2X/dtd/catalog.xml\ $out/share/docbook2X/xslt/catalog.xml\ ${docbook_xml_dtd_43}/xml/dtd/docbook/catalog.xml"
45 wrapProgram $out/bin/sgml2xml-isoent --prefix PATH : \
51 docbook2X is a software package that converts DocBook documents
52 into the traditional Unix man page format and the GNU Texinfo
55 license = licenses.mit;
56 homepage = "http://docbook2x.sourceforge.net/";
57 platforms = platforms.all;