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" <