summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/tyxml/default.nix
blob: 49cc56a1db6a7633c32c0fbe94ad471bec921206 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ stdenv, fetchzip, fetchpatch, ocaml, findlib, ocamlbuild, ocaml_oasis, camlp4, uutf, markup, ppx_tools, re
}:

assert stdenv.lib.versionAtLeast ocaml.version "4.02";

stdenv.mkDerivation rec {
  pname = "tyxml";
  version = "4.0.1";
  name = "ocaml${ocaml.version}-${pname}-${version}";

  src = fetchzip {
    url = "http://github.com/ocsigen/tyxml/archive/${version}.tar.gz";
    sha256 = "1mwkjvl78gvw7pvql5qp64cfjjca6aqsb04999qkllifyicaaq8y";
  };

  patches = [ (fetchpatch {
    url = https://github.com/dbuenzli/tyxml/commit/a2bf5ccc0b6e684e7b81274ff19df8d72e2def8d.diff;
    sha256 = "11sidgiwz3zqw815vlslbfzb456z0lndkh425mlmvnmck4d2v2i3";
  })];

  buildInputs = [ ocaml findlib ocamlbuild camlp4 ];

  propagatedBuildInputs = [uutf re ppx_tools markup];

  createFindlibDestdir = true;

  configureFlags = "--enable-syntax";

  meta = with stdenv.lib; {
    homepage = http://ocsigen.org/tyxml/;
    description = "A library that makes it almost impossible for your OCaml programs to generate wrong XML output, using static typing";
    license = licenses.lgpl21;
    platforms = ocaml.meta.platforms or [];
    maintainers = with maintainers; [
      gal_bolle vbgl
      ];
  };

}