From 7f28c64f110bd43136e90284e83cb55ebca70f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 29 Sep 2013 21:18:52 +0200 Subject: [PATCH] fop: new package fop is a XML formatter driven by XSL Formatting Objects (XSL-FO). Homepage: http://xmlgraphics.apache.org/fop/ --- pkgs/tools/typesetting/fop/default.nix | 56 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/tools/typesetting/fop/default.nix diff --git a/pkgs/tools/typesetting/fop/default.nix b/pkgs/tools/typesetting/fop/default.nix new file mode 100644 index 00000000000..bc4486ed49c --- /dev/null +++ b/pkgs/tools/typesetting/fop/default.nix @@ -0,0 +1,56 @@ +{ fetchurl, stdenv, ant, jdk }: + +stdenv.mkDerivation rec { + name = "fop-1.1"; + + src = fetchurl { + url = "http://apache.uib.no/xmlgraphics/fop/source/${name}-src.tar.gz"; + sha256 = "08i56d57w5dl5bqchr34x9165hvi5h4bhiflxhi0a4wd56rlq5jq"; + }; + + buildInputs = [ ant jdk ]; + + buildPhase = '' + ant + ''; + + installPhase = '' + mkdir -p "$out/bin" + mkdir -p "$out/lib" + mkdir -p "$out/share/doc/fop" + + cp build/*.jar lib/*.jar "$out/lib/" + cp -r README examples/ "$out/share/doc/fop/" + + # There is a fop script in the source archive, but it has many impurities. + # Instead of patching out 90 % of the script, we write our own. + cat > "$out/bin/fop" <