2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
|
2014-07-09 07:42:26 +00:00
|
|
|
let
|
|
|
|
pname = "xmlm";
|
2019-04-22 08:14:28 +00:00
|
|
|
webpage = "https://erratique.ch/software/${pname}";
|
2014-07-09 07:42:26 +00:00
|
|
|
in
|
2014-09-21 10:02:55 +00:00
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
if !lib.versionAtLeast ocaml.version "4.02"
|
2018-06-04 18:28:12 +00:00
|
|
|
then throw "xmlm is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
2017-10-07 05:15:50 +00:00
|
|
|
|
2014-07-09 07:42:26 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-06-04 18:28:12 +00:00
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
|
|
|
version = "1.3.0";
|
2014-07-09 07:42:26 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${webpage}/releases/${pname}-${version}.tbz";
|
2018-06-04 18:28:12 +00:00
|
|
|
sha256 = "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n";
|
2014-07-09 07:42:26 +00:00
|
|
|
};
|
|
|
|
|
2018-06-04 18:28:12 +00:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild topkg ];
|
2014-07-09 07:42:26 +00:00
|
|
|
|
2018-06-04 18:28:12 +00:00
|
|
|
inherit (topkg) buildPhase installPhase;
|
2014-07-09 07:42:26 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-07-09 07:42:26 +00:00
|
|
|
description = "An OCaml streaming codec to decode and encode the XML data format";
|
2019-09-08 23:38:31 +00:00
|
|
|
homepage = webpage;
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-09-21 10:02:55 +00:00
|
|
|
maintainers = [ maintainers.vbgl ];
|
|
|
|
license = licenses.bsd3;
|
2014-07-09 07:42:26 +00:00
|
|
|
};
|
|
|
|
}
|