1 { lib, stdenv, fetchFromGitLab, ocaml, findlib, iri, ppx_tools, js_of_ocaml
2 , js_of_ocaml-ppx, re }:
4 if lib.versionOlder ocaml.version "4.03"
5 || lib.versionAtLeast ocaml.version "4.11"
6 then throw "xtmpl not supported for ocaml ${ocaml.version}"
8 stdenv.mkDerivation rec {
9 name = "ocaml${ocaml.version}-xtmpl-${version}";
11 src = fetchFromGitLab {
12 domain = "framagit.org";
16 sha256 = "1hq6y4rhz958q40145k4av8hx8jyvspg78xf741samd7vc3jd221";
19 patches = [ ./jsoo.patch ];
22 substituteInPlace Makefile --replace js_of_ocaml.ppx js_of_ocaml-ppx
25 buildInputs = [ ocaml findlib ppx_tools js_of_ocaml js_of_ocaml-ppx ];
26 propagatedBuildInputs = [ iri re ];
28 createFindlibDestdir = true;
33 description = "XML templating library for OCaml";
34 homepage = "https://www.good-eris.net/xtmpl/";
35 license = licenses.lgpl3;
36 platforms = ocaml.meta.platforms or [];
37 maintainers = with maintainers; [ regnat ];