1{
2 lib,
3 stdenv,
4 fetchurl,
5 ocaml,
6 findlib,
7 ocamlbuild,
8 topkg,
9}:
10let
11 pname = "xmlm";
12 webpage = "https://erratique.ch/software/${pname}";
13in
14
15if lib.versionOlder ocaml.version "4.05" then
16 throw "xmlm is not available for OCaml ${ocaml.version}"
17else
18
19 stdenv.mkDerivation rec {
20 name = "ocaml${ocaml.version}-${pname}-${version}";
21 version = "1.4.0";
22
23 src = fetchurl {
24 url = "${webpage}/releases/${pname}-${version}.tbz";
25 sha256 = "sha256-CRJSJY490WMgw85N2yG81X79nIwuv7eZ7mpUPtSS2fo=";
26 };
27
28 nativeBuildInputs = [
29 ocaml
30 findlib
31 ocamlbuild
32 topkg
33 ];
34 buildInputs = [ topkg ];
35
36 strictDeps = true;
37
38 inherit (topkg) buildPhase installPhase;
39
40 meta = with lib; {
41 description = "OCaml streaming codec to decode and encode the XML data format";
42 homepage = webpage;
43 license = licenses.isc;
44 maintainers = [ maintainers.vbgl ];
45 mainProgram = "xmltrip";
46 inherit (ocaml.meta) platforms;
47 };
48 }