Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / ocaml-modules / xtmpl / default.nix
blobf1c1f15dc72dc21ed18ae9c81dbbc263a5b346fd
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}"
7 else
8 stdenv.mkDerivation rec {
9   name = "ocaml${ocaml.version}-xtmpl-${version}";
10   version = "0.17.0";
11   src = fetchFromGitLab {
12     domain = "framagit.org";
13     owner = "zoggy";
14     repo = "xtmpl";
15     rev = version;
16     sha256 = "1hq6y4rhz958q40145k4av8hx8jyvspg78xf741samd7vc3jd221";
17   };
19   patches = [ ./jsoo.patch ];
21   postPatch = ''
22     substituteInPlace Makefile --replace js_of_ocaml.ppx js_of_ocaml-ppx
23   '';
25   buildInputs = [ ocaml findlib ppx_tools js_of_ocaml js_of_ocaml-ppx ];
26   propagatedBuildInputs = [ iri re ];
28   createFindlibDestdir = true;
30   dontStrip = true;
32   meta = with lib; {
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 ];
38   };