2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, ocaml, findlib, iri, ppx_tools, js_of_ocaml
|
2018-07-11 00:13:01 +01:00
|
|
|
, js_of_ocaml-ppx, re }:
|
2017-03-23 07:56:01 +00:00
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
if lib.versionOlder ocaml.version "4.03"
|
|
|
|
|| lib.versionAtLeast ocaml.version "4.11"
|
2017-03-23 07:56:01 +00:00
|
|
|
then throw "xtmpl not supported for ocaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
stdenv.mkDerivation rec {
|
2018-07-11 00:13:01 +01:00
|
|
|
name = "ocaml${ocaml.version}-xtmpl-${version}";
|
|
|
|
version = "0.17.0";
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "framagit.org";
|
2017-03-23 07:56:01 +00:00
|
|
|
owner = "zoggy";
|
|
|
|
repo = "xtmpl";
|
|
|
|
rev = version;
|
2018-07-11 00:13:01 +01:00
|
|
|
sha256 = "1hq6y4rhz958q40145k4av8hx8jyvspg78xf741samd7vc3jd221";
|
2017-03-23 07:56:01 +00:00
|
|
|
};
|
|
|
|
|
2019-09-06 17:01:55 +01:00
|
|
|
patches = [ ./jsoo.patch ];
|
|
|
|
|
2020-06-21 06:33:14 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile --replace js_of_ocaml.ppx js_of_ocaml-ppx
|
|
|
|
'';
|
|
|
|
|
2018-07-11 00:13:01 +01:00
|
|
|
buildInputs = [ ocaml findlib ppx_tools js_of_ocaml js_of_ocaml-ppx ];
|
|
|
|
propagatedBuildInputs = [ iri re ];
|
2017-03-23 07:56:01 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2017-04-01 09:54:30 +01:00
|
|
|
dontStrip = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-07-11 00:13:01 +01:00
|
|
|
description = "XML templating library for OCaml";
|
|
|
|
homepage = "https://www.good-eris.net/xtmpl/";
|
2017-03-23 07:56:01 +00:00
|
|
|
license = licenses.lgpl3;
|
|
|
|
platforms = ocaml.meta.platforms or [];
|
|
|
|
maintainers = with maintainers; [ regnat ];
|
|
|
|
};
|
|
|
|
}
|