lol
1{ stdenv, lib, fetchFromGitHub, ocaml, findlib, gitUpdater }:
2
3stdenv.mkDerivation rec {
4 pname = "ocaml${ocaml.version}-xml-light";
5 version = "2.4";
6
7 src = fetchFromGitHub {
8 owner = "ncannasse";
9 repo = "xml-light";
10 rev = version;
11 sha256 = "sha256-2txmkl/ZN5RGaLQJmr+orqwB4CbFk2RpLJd4gr7kPiE=";
12 };
13
14 nativeBuildInputs = [ ocaml findlib ];
15
16 strictDeps = true;
17
18 createFindlibDestdir = true;
19
20 installPhase = ''
21 runHook preInstall
22 make install_ocamlfind
23 mkdir -p $out/share
24 cp -vai doc $out/share/
25 runHook postInstall
26 '';
27
28 passthru.updateScript = gitUpdater { };
29
30 meta = {
31 description = "Minimal Xml parser and printer for OCaml";
32 longDescription = ''
33 Xml-Light provides functions to parse an XML document into an OCaml
34 data structure, work with it, and print it back to an XML
35 document. It support also DTD parsing and checking, and is
36 entirely written in OCaml, hence it does not require additional C
37 library.
38 '';
39 homepage = "http://tech.motion-twin.com/xmllight.html";
40 license = lib.licenses.lgpl21;
41 maintainers = [ lib.maintainers.romildo ];
42 inherit (ocaml.meta) platforms;
43 };
44}