2018-07-14 09:27:11 +01:00
|
|
|
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, uutf, markup, ppx_tools_versioned, re
|
2018-08-20 17:51:54 +01:00
|
|
|
, withP4 ? true
|
2018-07-14 09:27:11 +01:00
|
|
|
, camlp4 ? null
|
2016-12-04 10:23:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert stdenv.lib.versionAtLeast ocaml.version "4.02";
|
2014-06-08 11:12:27 +01:00
|
|
|
|
2016-05-30 14:55:30 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tyxml";
|
2018-02-01 20:59:53 +00:00
|
|
|
version = "4.2.0";
|
2016-12-04 10:23:03 +00:00
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
2014-06-08 11:12:27 +01:00
|
|
|
|
2016-12-04 10:23:03 +00:00
|
|
|
src = fetchzip {
|
2016-05-30 14:55:30 +01:00
|
|
|
url = "http://github.com/ocsigen/tyxml/archive/${version}.tar.gz";
|
2018-02-01 20:59:53 +00:00
|
|
|
sha256 = "1zrkrmxyj5a2cdh4b9zr9anwfk320wv3x0ynxnyxl5za2ix8sld8";
|
2016-12-04 10:23:03 +00:00
|
|
|
};
|
|
|
|
|
2018-07-14 09:27:11 +01:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ppx_tools_versioned markup ]
|
|
|
|
++ stdenv.lib.optional withP4 camlp4;
|
2014-06-08 11:12:27 +01:00
|
|
|
|
2018-02-01 20:59:53 +00:00
|
|
|
propagatedBuildInputs = [ uutf re ];
|
2014-06-08 11:12:27 +01:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2018-07-14 09:27:11 +01:00
|
|
|
configureFlags = stdenv.lib.optional withP4 "--enable-syntax";
|
2016-05-30 14:55:30 +01:00
|
|
|
|
2014-09-30 05:25:31 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-06-08 11:12:27 +01:00
|
|
|
homepage = http://ocsigen.org/tyxml/;
|
2014-12-30 02:31:03 +00:00
|
|
|
description = "A library that makes it almost impossible for your OCaml programs to generate wrong XML output, using static typing";
|
2014-09-30 05:25:31 +01:00
|
|
|
license = licenses.lgpl21;
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-09-30 05:25:31 +01:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
gal_bolle vbgl
|
2014-06-08 11:12:27 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2014-09-06 09:44:20 +01:00
|
|
|
}
|