1{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, uutf, markup, ppx_tools_versioned, re
2, withP4 ? true
3, camlp4 ? null
4}:
5
6assert stdenv.lib.versionAtLeast ocaml.version "4.02";
7
8stdenv.mkDerivation rec {
9 pname = "tyxml";
10 version = "4.2.0";
11 name = "ocaml${ocaml.version}-${pname}-${version}";
12
13 src = fetchzip {
14 url = "http://github.com/ocsigen/tyxml/archive/${version}.tar.gz";
15 sha256 = "1zrkrmxyj5a2cdh4b9zr9anwfk320wv3x0ynxnyxl5za2ix8sld8";
16 };
17
18 buildInputs = [ ocaml findlib ocamlbuild ppx_tools_versioned markup ]
19 ++ stdenv.lib.optional withP4 camlp4;
20
21 propagatedBuildInputs = [ uutf re ];
22
23 createFindlibDestdir = true;
24
25 configureFlags = stdenv.lib.optional withP4 "--enable-syntax";
26
27 meta = with stdenv.lib; {
28 homepage = http://ocsigen.org/tyxml/;
29 description = "A library that makes it almost impossible for your OCaml programs to generate wrong XML output, using static typing";
30 license = licenses.lgpl21;
31 platforms = ocaml.meta.platforms or [];
32 maintainers = with maintainers; [
33 gal_bolle vbgl
34 ];
35 };
36
37}