about summary refs log tree commit diff
path: root/pkgs/tools/typesetting/xmlto
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-03-11 08:44:22 +0000
committerLudovic Courtès <ludo@gnu.org>2008-03-11 08:44:22 +0000
commitd195542ac31fcd8deec5545225896218acc2be31 (patch)
tree1a2dfbd2e44a188d1d58fe587bc2d2d56daef5b3 /pkgs/tools/typesetting/xmlto
parent2d15d4c269c723865997572dbd7bdc1114f78799 (diff)
Add `xmlto', a front-end to an XSL toolchain.
svn path=/nixpkgs/trunk/; revision=11048
Diffstat (limited to 'pkgs/tools/typesetting/xmlto')
-rw-r--r--pkgs/tools/typesetting/xmlto/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/xmlto/default.nix b/pkgs/tools/typesetting/xmlto/default.nix
new file mode 100644
index 0000000000000..1156b372eea39
--- /dev/null
+++ b/pkgs/tools/typesetting/xmlto/default.nix
@@ -0,0 +1,43 @@
+{ fetchurl, stdenv, flex, libxml2, libxslt
+, docbook_xml_dtd_42, docbook_xsl
+, bash, getopt, mktemp, findutils
+, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "xmlto-0.0.20";
+  src = fetchurl {
+    url = "http://cyberelk.net/tim/data/xmlto/stable/${name}.tar.bz2";
+    sha256 = "1s71khb0ycawhjpr19zrrqk0jac11jgwvxnajjkm2656p5qikylz";
+  };
+
+  patchPhase = ''
+    substituteInPlace "xmlto.in" \
+      --replace "/bin/bash" "${stdenv.bash}/bin/bash"
+    substituteInPlace "xmlto.in" \
+      --replace "/usr/bin/locale" "${stdenv.glibc}/bin/locale"
+  '';
+
+  configureFlags = ''
+    --with-mktemp=${mktemp}/bin/mktemp
+    --with-find=${findutils}/bin/find
+    --with-bash=${stdenv.bash}/bin/bash
+    --with-getopt=${getopt}/bin/getopt
+  '';
+
+  # `libxml2' provides `xmllint', needed at build-time and run-time.
+  # `libxslt' provides `xsltproc', used by `xmlto' at run-time.
+  buildInputs = [ libxml2 libxslt docbook_xml_dtd_42 docbook_xsl makeWrapper ];
+
+  postInstall = ''
+    wrapProgram $out/bin/xmlto --prefix PATH : "${libxslt}/bin:${libxml2}/bin"
+  '';
+
+  meta = {
+    description = ''xmlto is a front-end to an XSL toolchain.  It chooses
+                    an appropriate stylesheet for the conversion you want
+		    and applies it using an external XSL-T processor.  It
+		    also performs any necessary post-processing.'';
+    license = "GPLv2+";
+    homepage = http://cyberelk.net/tim/software/xmlto/;
+  };
+}
\ No newline at end of file