1 { fetchurl, lib, stdenv, libxml2, libxslt
2 , docbook_xml_dtd_45, docbook_xsl, w3m
3 , bash, getopt, makeWrapper }:
5 stdenv.mkDerivation rec {
9 url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.bz2";
10 sha256 = "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i";
14 patchShebangs xmlif/test/run-test
16 substituteInPlace "xmlto.in" \
17 --replace "/bin/bash" "${bash}/bin/bash"
18 substituteInPlace "xmlto.in" \
19 --replace "/usr/bin/locale" "$(type -P locale)"
20 substituteInPlace "xmlto.in" \
21 --replace "mktemp" "$(type -P mktemp)"
24 # `libxml2' provides `xmllint', needed at build-time and run-time.
25 # `libxslt' provides `xsltproc', used by `xmlto' at run-time.
26 nativeBuildInputs = [ makeWrapper getopt ];
27 buildInputs = [ libxml2 libxslt docbook_xml_dtd_45 docbook_xsl ];
30 # `w3m' is needed for HTML to text conversions.
31 wrapProgram "$out/bin/xmlto" \
32 --prefix PATH : "${lib.makeBinPath [ libxslt libxml2 getopt w3m ]}"
36 description = "Front-end to an XSL toolchain";
39 xmlto is a front-end to an XSL toolchain. It chooses an
40 appropriate stylesheet for the conversion you want and applies
41 it using an external XSL-T processor. It also performs any
42 necessary post-processing.
45 license = lib.licenses.gpl2Plus;
46 homepage = "https://pagure.io/xmlto/";
47 platforms = lib.platforms.unix;